windows-10-universalpdftronpdfnet

Adding custom font to FreeText in PDFTron


Hi I'm using PDFTron for a Windows 10 app in C# I'm working on. We have Highlight Path and Text annotation.

I embed the text annotation to the PDF using a FreeText object. But I don't find any easy way to embed a custom font in to that particular annotation.

Regards.


Solution

  • This forum post shows how to set the font using one of the 14 builtin PDF fonts.

    Note that actually embedding a custom font is not ideal, as that causes issues if someone wants to later on update the contents of the annotation, and the required characters are not embedded. It is best to stick with one of the built in fonts.