When using aspose.word to convert Word to PDF using doc.save() method using streams instead of local files, the font styling of the word does not match with that of the generated PDF. We are using a low code-no code solution to build the word document which returns a output byte stream which is fed to the aspose API. The word document generated consuming the output stream displays the correct stream. However, the PDF stream generated by Aspose does not seem to render the correct font.
To confirm, we are also running this conversion on our app server which is hosted as a container. Could you please confirm the source of the font directory which aspose uses internally and can the same be achieve programatically to specify an external end point as the source of the font style?
If after providing the required fonts the problem still resists, please attach your input and output documents here for testing. We will check the issue and provide you more information.
Hi @alexey.noskov , thanks for the quick reply. Currently based on the suggestion to use true type fonts, I added logic to use MemoryFontSource to load the different fonts that are needed in the pdf generation. However, after adding the changes, I am seeing the PDF generated to use Famwood font which I believe in the default substitute font. Could you please help me on the below code if I am setting the font source correctly.
Thanks a lot for your suggestion. It seems the issue was with the byte stream not having the correct font data. Currently the font is getting picked. Thanks for the help.
However, there is a different issue found, where we have added a checkbox (with the tick enabled) in the input word stream but it does not appear in the generated PDF. Based on suggestions, we have also tried to include the windings-regular font but it did not resolve the issue. Could you please help on this. Appreciate a lot.
Note: To confirm the empty checkbox appears fine, the issue is with the check mark not rendering.
Update: @alexey.noskov , please ignore this issue. It was using a different font. Thanks a lot for the guidance on the previous issues.