pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Munn <and...@nmedia.net>
Subject PDFBox No glyph for font error
Date Wed, 18 Mar 2015 23:03:47 GMT
I am testing out code like this on Windows w/PDFbox 2.0.0:

	PDFont fontPlain = PDType1Font.TIMES_ROMAN;
	PDPageContentStream cos = new PDPageContentStream(document, page1);
	cos.setFont(fontPlain, 12);
        cos.drawString("Hello World");

And I'm getting the same error mentioned recently on stackoverflow.  Is 
there a workaround?  I don't really care what font gets used.


java.lang.IllegalArgumentException: No glyph for U+0048 in font Times-Bold
	at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:303)
	at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
	at org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:316)
	at org.apache.pdfbox.pdmodel.PDPageContentStream.drawString(PDPageContentStream.java:282)



To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message