Closed sysmat closed 5 years ago
Yes. First, load the ttf file as a PDFont. You can then assign the PDFont to a TextElement.
PDFont font = PDTrueTypeFont.loadTTF(document, "Arial.ttf");
TextElement textElement = new TextElement(document);
textElement.setPdFont(font);
Make sure the font is embedded inside the document when you distribute to end-users.
See:
Thx for information I was thinking as DSL
Is it possible to use ttf file for fonts?
Regards, Tomaž