We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Custom image for a bullet

Hello,

Is there any way to get or set image used in a customized bullet with you java Word API ?

Hi Jean-Pascal,


Thanks
for your inquiry. Unfortunately, currently there is no way to create
image bullets using Aspose.Words. Your request has been linked to the
appropriate issue (WORDSNET-2556) in our issue tracking system and you
will be notified as soon as it is resolved. Sorry for the inconvenience.

Secondly, as a workaround you may want to change the bullet symbol of the list item by using the following code:

Document doc = new Document();

// Create a list based on one of the Microsoft Word list templates.

List list = doc.getLists().add(ListTemplate.NUMBER_DEFAULT);

// Completely customize one list level.

ListLevel level1 = list.getListLevels().get(0);

level1.getFont().setColor(Color.RED);

level1.getFont().setSize(24);

level1.getFont().setName("Wingdings");

level1.setNumberStyle(NumberStyle.ORDINAL_TEXT);

level1.setStartAt(21);

level1.setNumberFormat("\uf0af");

level1.setNumberPosition(-36);

level1.setTextPosition(10);

level1.setTabPosition(10);

// Completely customize yet another list level.

ListLevel level2 = list.getListLevels().get(1);

level2.setAlignment(ListLevelAlignment.RIGHT);

level2.setNumberStyle(NumberStyle.BULLET);

level2.getFont().setName("Wingdings");

level2.getFont().setColor(Color.BLUE);

level2.getFont().setSize(24);

level2.setNumberFormat("\uf0af"); // A bullet that looks like some sort of a star.

level2.setTrailingCharacter(ListTrailingCharacter.SPACE);

level2.setNumberPosition(20);

// Now add some text that uses the list that we created.

// It does not matter when to customize the list - before or after adding the paragraphs.

DocumentBuilder builder = new DocumentBuilder(doc);

builder.getListFormat().setList(list);

builder.writeln("The quick brown fox...");

builder.writeln("The quick brown fox...");

builder.getListFormat().listIndent();

builder.writeln("jumped over the lazy dog.");

builder.writeln("jumped over the lazy dog.");

builder.getListFormat().listOutdent();

builder.writeln("The quick brown fox...");

builder.getListFormat().removeNumbers();

builder.getDocument().save(MyDir + "Lists.CreateCustomList Out.doc");

Thanks for your reply.

Unfortunately your workaround is not working for me as i want to use my personal images, not the icons provided by Word.

I have seen similar posts on this forum posted several years ago (2009, 2011, …).
Do you really plan to fix it ? If yes can you tell me when ?

Hi Jean-Pascal,


Thanks
for your inquiry. I am afraid this feature WORDSNET-2556 has now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.

We apologize for your inconvenience.

Apparently it has been postponed for at least 5 years … quite a long time …
Is it scheduled for a specific release or not ? If yes, which one please ?

Hi Jean-Pascal,


Thanks

for your inquiry. I have requested the development team to share the ETA of this feature. As soon as any information is shared by them, I will be more than happy to share that with you.

We apologize for your inconvenience.