While coverting word document to pdf document, bullet points are not getting converted to bullet in pdf version, can you please help me identify the font getting used by aspose while coverting and help us with font which needs to be install for expected result.
Original_Document.docx (26.7 KB)
@govindsgs I cannot reproduce the problem on my side. Here is the output document produced on my side suing the following simple code:
Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");
out.pdf (92.9 KB)
Could you please attach PDF document produced on your side?
The problem might occur because the fonts used in your document are not available in the environment where the document is converted. If Aspose.Words cannot find the fonts used in the document the fonts are substituted . This might lead into the layout difference, since substitution fonts might have different font metrics or glyphs might not be available in the substituted fonts. You can implement IWarningCallback to get a notification when font substitution is performed.
@govindsgs As I can see in your PDF document SymbolBook font is used, but in PDF generated on my side SymbolMT is used.
The problem might be caused by a known peculiarity. Windows “Symbol” font is a symbolic font (like “Webdings”, “Wingdings”, etc.) which uses Unicode PUA. MacOS or Linux “Symbol” font on the other hand is a proper Unicode font (for example Greek characters are in the U+0370…U+03FF Greek and Coptic block). So these fonts are incompatible and Mac/Linux “Symbol” font cannot be used instead of Windows “Symbol” without additional actions. In your particular case it is required to change the bullet codepoint from PUA U+F0B7 (or U+00B7 which also can be used in MS Word for symbolic fonts) to the U+2022 in the document.
Please try using the following code as a workaround:
Document doc = new Document("/Users/mac1/Downloads/BulletPoint.docx");
for (com.aspose.words.List lst : doc.getLists())
{
for (com.aspose.words.ListLevel level : lst.getListLevels())
{
if (level.getFont().getName().equals("Symbol") && level.getNumberFormat().equals("\uF0B7"))
{
level.setNumberFormat("\u2022");
}
}
}
doc.save("/Users/mac1/Downloads/out1.pdf");