on-internet
← Community

PDFBox: No glyph for U+0050 in extracted font

Stack Overflow ·

I'm trying to create new page in document and write some text to it, while using the font contained in the file. The font is extracted from the resources: PDPage page = document.getPage(0); PDResources res = page.getResources(); List<PDFont> fonts = new ArrayList<>(); for (COSName fontName : res.getFontNames()) { PDFont font = res.getFont(fontName); System.out.println(font); fonts.add(font); } And later used to write some text: stream.beginText(); stream.setFont(fonts.get(0), 12); stream.setTextMatrix(Matrix.getTranslateInstance(20, 50)); stream.showText("Protokol"); stream.endText(); The show

Comments

Sign in or sign up to comment and upvote.

No comments yet.