Knowledge Base - Wrong fonts' rendering (iOS)

When you notice that the pdf is rendered with a wrong font, it probably means that the pdf uses a font that is not embedded in the pdf.

In this case the SDK uses a default font to show the content, which may seems different.

You can either embed the font to the pdf, or -if you cannot modify the pdf to embed the font-, you can use the SDK to add the font, the steps are:

  • You should include YOUR_FONT font as an asset in your own project, ex (Assets/font/YOUR_FONT)
  • Select the font file and in the properties, change Build Action into Content, and Copy to Output Directory to Copy if newer.
  • In App.xaml.cs -> AddFontsToList or OnLaunched (in older versions):
    • Add the following between PDFGlobal.FontFileListStart(); and PDFGlobal.FontFileListEnd();
      • PDFGlobal.FontFileListAdd(inst_path + "\\Assets\\font\\YOUR_FONT.ttf");
    • If you are not using the exact pdf font (equivalent font), you will need also to map the original font to your font in MapFonts method:
      • PDFGlobal.FontFileMapping("ORIGINAL_FONT", "YOUR_FONT");
Applies To

RadaeePDF SDK for Windows 10

Related Articles

Wrong fonts' rendering and adding your own fonts (Android)

Add your own fonts (iOS)


Created : 2017-02-01 11:11:11, Last Modified : 2018-02-07 09:29:00