Hi Team,
When converting Word documents to PDF format using Aspose.Words on our server environment, fonts (specifically those highlighted in yellow in the attached input Word file) are not being embedded or rendered correctly in the output PDF.
I have attached both the input DOC file and the output PDF for your reference.
We are using Aspose.Words Version 22.12.0.0.
What is the recommended approach for ensuring fonts are properly embedded in PDFs when converting in server environments?
Input_word_file.docx (15.0 KB)
Converted_PDF.pdf (73.1 KB)
@Surekha Usually, the such problems occur because the fonts used in your input document are not available on the machine where document is converted to PDF. The fonts are required to build document layout. If Aspose.Words cannot find the font used in the document, the font is substituted . This might lead into fonts mismatch and document layout differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/
Hi @alexey.noskov, Thank you for your prompt response.
But Installing fonts on the server is challenging due to infrastructure constraints, and with multiple fonts involved, it is currently unclear which specific ones are required. Is it possible to resolve the issue without installing additional fonts? Are there any alternative approaches you would recommend?
@Surekha Unfortunately, it is impossible to build an accurate document layout without fonts. As an option you can embed fonts into your input documents. In this case Aspose.Words will use fonts embedded into the source documents for rendering. But, if I understand properly, you have no control over the document creation process.