Convert Word to PDF - Bullet list is not showing in the output

@asad.ali we have another issue when converting a word file to pdf, if the word file contains list bullet like this image

after converting the word document to a pdf , bullet list isn’t shown correctly.

@minaeimi Could you please attach your actual input and output documents here for testing? WE will check the issue and provide you more information.

Most likely the problem occurs because the fonts are not available on the machine where the document is converted to PDF. If Aspose.Words cannot find the fonts used in the document the fonts are substituted. This might lead into the layout differences due to differences in fonts metrics. You can implement IWarningCallback to get a notification when font substitution is performed.
The following articles can be useful for you:
https://docs.aspose.com/words/java/specify-truetype-fonts-location/
https://docs.aspose.com/words/java/install-truetype-fonts-on-linux/

@alexey.noskov Thank you for your response. We also believe that the issue is related to fonts, as everything works correctly in our local environment but not on the Linux servers. We’re encountering two other similar issues as well (Error when converting pdf file to word file - #16 by minaeimi) . We have already implemented the solution which is suggested here (Error when converting pdf file to word file - #16 by minaeimi) but unfortunately it didn’t resolved the issue.

Please find the attached documents for your reference.
test_bulletlist.pdf (264.6 KB)

test_bulletlist.docx (48.0 KB)

@minaeimi Thank you for additional information. For rendering bullets in your document Wingdings font s used. It looks like this font is not available in the environment where the document is converted to PDF. Please try installing this font. This must resolve the problem.

@alexey.noskov there are bullet list with font Arial and that doesn’t work either. We have font Arial on our servers.

@minaeimi All bullets in the provided document have Windings font. There are no Arial bullets.

@alexey.noskov thanks, It seems that the fonts are not available for Aspose. I will follow the instructions in the links you sent, and hopefully that will resolve the issue.

1 Like

Hi @alexey.noskov, We used following codes to register our fonts but looks like they are not available.

function registerAsposeLicense() {
    var path = plugins.file.getDefaultUploadLocation();

    var license = new Packages.com.aspose.words.License();
    // Call setLicense method to set license
    license.setLicense("Aspose.Words.Java.lic");
	
    registeAsposeCustomFonts();
}

function registeAsposeCustomFonts(){
    var fontFolder = '/usr/share/fonts/truetype/';

    var FolderFontSource = Packages.com.aspose.pdf.FolderFontSource;
    var FontRepository = Packages.com.aspose.pdf.FontRepository;

    var fs = new FolderFontSource(fontFolder); 
    FontRepository.getSources().add(fs);
}

@minaeimi The code above set the fonts location for Aspose.PDF not for Aspose.Words. You should use code like this:

com.aspose.words.FontSettings.getDefaultInstance().setFontsSources(new FontSourceBase[]{ new FolderFontSource("/usr/share/fonts/truetype/", true)});