pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: U+000A ('controlLF') is not available in Helvetica
Date Mon, 03 Jul 2017 15:42:18 GMT
Am 03.07.2017 um 17:37 schrieb Thad Humphries:
> I'm getting an error when trying to print text created by Windows:
>
> Servlet failed with an Exception
> java.lang.IllegalArgumentException: U+000A ('controlLF') is not available
> in this font Helvetica (generic: NimbusSanL-Regu) encoding:
> WinAnsiEncoding
> at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:406)
> at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:316)
> at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:345)
> ...
>
>
> As you know, Windows uses CRLF (0x0D0A) for end-of-line, but
> PDType1Font.HELVETICA does not seem to recognize 0x0A. This seems like a
> bug with the font.
>
> Is there a fix for this? I'd rather not have to search all text to remove
> 0x0A.

It's not a bug. There is no glyph for CR LF. You need to clean up your 
input.

Tilman

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


Mime
View raw message