The final PDF file does not retain the fonts that was provided as part of the Word Template

Hi,

We have a Word template from our Client that contains Proxima font which we loaded on the Files section of our part of Aspose. When we generate a Word Output the fonts remain unchanged, however when we generate a PDF file its not retaining the fonts and reverting back to TimesNewRoman. We did get a PDF version of the file from the Vendor and when I checked the Properties they do have the right fonts. We have uploaded the ttf files for the fonts.
Can you let us know what could be the issue here?

Thank you

@centris.aspose

Can you please provide the code you are using to generate the PDF from the Word template and confirm if the font files are correctly referenced in your code?

Please share what API endpoint you use for conversion. Do you specify the FontsLocation parameter when executing conversion?

We are using the Aspose.Words API using following steps

  1. Execute the Merge by calling the MailMerge API
  2. When we download the file calling the same API and send the fontsLocation attribute if its a CustomFont which in this case it is.
  3. Then we delete the Merged and Template files.

What do you mean by " 2. When we download the file calling the same API and send the fontsLocation attribute if its a CustomFont which in this case it is."
When I asked about endpoints, I meant /convert or /saveAs

We use https://api.aspose.cloud/v4.0/words/{FileName}/MailMerge

Your first message was about PDF does not contain the fonts, MailMerge operation doesn’t produce PDF, so that’s why I asked what endpoint you use to convert merged document to PDF.

Here are the steps from our log that might help you

First we upload the template using the below call
Endpoint=https://api.aspose.cloud/v4.0/words/storage/file/HLX-TNS-19521%20SB%20Invites_Branded_Print_Mv2_RIS-41184_LIVE.docx, Method=PUT
Then we perform merge using call
Endpoint=https://api.aspose.cloud/v4.0/words/HLX-TNS-19521%20SB%20Invites_Branded_Print_Mv2_RIS-41184_LIVE.docx/MailMerge?withRegions=True&cleanup=ContainingFields,EmptyParagraphs,UnusedFields,UnusedRegions,RemoveTitleRow,RemoveTitleRowInInnerTables&useWholeParagraphAsRegion=False&destFileName=merge_HLX-TNS-19521%20SB%20Invites_Branded_Print_Mv2_RIS-41184_LIVE.docx, Method=PUT
We then get the BLOB by making this call Endpoint=https://api.aspose.cloud/v4.0/words/merge_HLX-TNS-19521%20SB%20Invites_Branded_Print_Mv2_RIS-41184_LIVE.docx?fontsLocation=customFonts&format=PDF, Method=GET

Okay, thank you for sharing more details. May I ask you to share the font and merged document? I will analyze why fonts do not apply.

Hi, we were finally able to resolve this by providing the correct font file formats that Aspose supports and got the latest from Client which made it possible to generate the document properly. We can close this case for now. Thank you!