Implementing custom font substitution using PDFNet.

90 views
Skip to first unread message

Support

unread,
Mar 7, 2007, 8:46:20 PM3/7/07
to PDFTron PDFNet SDK
Q:

I have some PDF documents that are missing fonts (i.e. fonts are not
embedded). PDFNet automatically substitutes fonts when rendering a
page, but I would like to implement my own font substitution. Is this
possible using PDFNet?

----

A:

Using PDFNet SDK, you can implement custom font substitution by
calling PDFNet.AddFontSubst(...) after opening the document (but
before rendering the document).

After the document is opened you can quickly find all font objects
used on a given page(s) (or the entire document). pdftron.PDF.Font API
can be used to check is the font is embedded or not (e.g.
font.GetEmbeddedFont()). If the font is not embedded you can choose a
font substitute based on Font API or by querying low-level SDF font.

Reply all
Reply to author
Forward
0 new messages