pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johanneke Lamberink <johanneke.lamber...@onior.com>
Subject IllegalArgumentException when using PDType1Font.HELVETICA
Date Wed, 27 May 2015 08:52:14 GMT

When writing a given String to a PDF I am encountering the following stacktraces in the logging:

Caused by: java.lang.IllegalArgumentException: No glyph for U+000A in font Helvetica
        at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:320)
        at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:282)
        at org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:358)


Caused by: java.lang.IllegalArgumentException: This font type only supports 8-bit code points
        at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:311)
        at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:282)
        at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:311)

I am not sure if this is a problem in my choice of font, my use of the api, or the encoding
done by pdfbox.

Can anyone explain to me what it is that is going wrong here?

Thanks :)

Johanneke Lamberink

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message