C# Aspose.Word to PDF with Custom TTF font

Hi all,

I have been trying to convert a Word file to PDF using Aspose in C#. But when I use a Custom font (OTF) Klavika-medium-italic but converted to TTF in the Word template, I get a different font in the generated PDF.

Word Settings:

  • Embed fonts in the file is checked.
  • Embed only the characters used in the document is not checked
  • Do not embed common system fonts is not checked

I have tried to add this in the code:

  •            document.FontInfos.EmbedTrueTypeFonts = true;
    
  •            document.FontInfos.EmbedSystemFonts = true;
    

But it does not help.

Using the following:

  • Aspose.Words v19.4.0
  • Visual Studio 2019
  • Microsoft Word 365

Does any one have any tips?

@tyret44 Could you please attach your document and font here for testing? We will check the issue and provide you more information.