Word to pdf conversion issue. java

Hello,

We are trying to convert a word document to pdf and when we do that without loading the license file, it converts okay without any issues. When we add the license file, the same word document is missing some text in the converted pdf. Could you please assist. We are using aspose version 19.9 with Java

Thanks
J

@judiciary Could you please attach the problematic document and output document here for testing? We will check the issue and provide you more information.

Attached the input and output documents.
Input.docx (48 KB)
output.pdf (28.0 KB)

@judiciary I have checked conversion on my side and cannot reproduce the problem neither with the latest 22.4 version nor with 19.9 version of Aspose.Words.
I have noticed fonts used in the document are substituted in your output document. Maybe this causes the problem on my side. Please try using the following code:

Document doc = new Document("C:\\Temp\\in.doc");
doc.setWarningCallback(new FontSubstitutionWarningCollector());
doc.save("C:\\Temp\\out.pdf");
private static class FontSubstitutionWarningCollector implements IWarningCallback
{

    public void warning(WarningInfo info)
    {
        if (info.getWarningType() == WarningType.FONT_SUBSTITUTION)
            System.out.println(info.getDescription());
    }
}

This is happening only when we run this code as part of a lambda in aws environment. On prem the document conversion works fine

@judiciary Thank you for additional information. Most likely the reason of the problem is fonts used in AWS on your side. Could you please attach the fonts used in AWS:

  • BPArial
  • DjVuDingbats
  • DjVuDingbats Bold
  • DjVuDingbats Italic
  • Tahoma

If check the output document, text content is actually there, but it is invisible.

Are you suggesting the listed fonts to be added. If fonts are missing, how is the document converting successfully when we don’t supply aspose license?

@judiciary The listed fonts are embedded into the output document produced on your side. So they are available in the environment where conversion is performed. We need these fonts to be able to reproduce the problem on our side.
You can use IWarningCallback implementation from my previous answer to check what fonts from the source document were substituted while conversion.