Android font specification for PDF documents

I am trying to control the fonts that are used for viewing PDF files on Android phone and tablet. The documentation says that the best possible match will be taken from pdfnet.res when rendering a PDF in the client viewer. Is it possible to constrain the fonts contained in pdfnet.res to a subset of what is currently included? For example, limit the font types to courier, times new roman, and tahoma, or some other subset.

Platform: Android phone and tablet
Version of PDFTron: 6.3.2 (



Hi Ron,

Just to clarify, inside PDFNet, it only contains base 14 fonts.
When a PDF document does not have embedded fonts, and the fonts needed are non-base 14 fonts, it tries to load best suitable font that is available on the system. Therefore, font selection will depend on what fonts are available in the system.

To override default PDFNet font selection, you can use [PDFNet.addFontSubst](, java.lang.String)).
For example, to use DroidSans as default font:

File fontDroidSans = new File("/system/fonts/DroidSans.ttf");

PDFNet.addFontSubst(PDFNet.e_Identity, fontDroidSans.getAbsolutePath());

Best Regards,

For more samples of how to use addFontSubst() see commented out code at beginning of PDFDraw sample: