Bullets appearing as image while converting word to pdf using aspose.words

Hi Team,

We are facing a strange issue where the bullets are appearing as images while converting word to pdf using aspose.words
Word source:-


Generated PDF

Pls advise if this can be resolve by adding a new ttf font.

@priyanka9 Could you please attach your input and output documents here for testing? We will check the issue and provide you more information. Unfortunately, it is impossible to analyze the problem using screenshots.

Hi Alex,

PFA attached sample
ts.Content.KeyRisks.docx (22.6 KB)

we are generating PDF using below aspose commands

ClonedDocumentResponseDTO cloneRes = (ClonedDocumentResponseDTO)result.getData();
Document document = cloneRes.getDocument();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
FontSettings fontSettings = new FontSettings();
fontSettings.getDefaultInstance().setFontsSources(new FontSourceBase[] { new SystemFontSource(), new FolderFontSource("classpath:font/", true) });
document.setFontSettings(fontSettings);
var fonts = document.getFontSettings().getFontsSources().length;
LoggerHelper.doAppLog(DocumentServiceImpl.class, "fonts---" + fonts);
if (docType.equals("Docx")) document.save(outputStream, SaveFormat.DOCX);
else if (docType.equals("Pdf")) document.save(outputStream, SaveFormat.PDF);

@priyanka9 The problem is not reproducible on my side. It looks like there are no required fonts in your environment. Please try implementing IWarningCallback to check whether font substitution is performed.
As I can see in your code you are using new FolderFontSource("classpath:font/", true), it looks like you are trying to load fonts from the JAR or from the project. FolderFontSource expects an absolute path to the fonts folder and it does not support loading from from the JAR. So please try specifying an absolute path to the fonts folder.

Hi Alex,
Thanks for your reply.
We have actually copied all the fonts from windows to the application’s resources folder and have set the path of the same.
By this, we are able to resolve all other font related issues and only seeing the issue with bullets.
Any idea which fonts are used by PDF to display bullets same as word so that we can add that font as well to the application’s resources folder.

Thanks,
Priyanka

@priyanka9 Symbol font is used for rendering bullets.