You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2016/01/06 17:06:39 UTC

[jira] [Commented] (PDFBOX-3184) Throwing in PDType1Font.encode for chars above 255 is wrong.

    [ https://issues.apache.org/jira/browse/PDFBOX-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085732#comment-15085732 ] 

Andreas Lehmkühler commented on PDFBOX-3184:
--------------------------------------------

You are using one of the 14 standard fonts and their encoding is limited to 8 bit codes
{quote}
Can't encode U+2019 in font Helvetica. Type 1 fonts only support 8-bit code points
{quote}
You have to follow the WinAnsiEncoding as described in the PDF spec. Use U+0092 instead of U+2019 and everything should work fine. 
Alternatively you can embbed a font using PDType0Font, which supports unicode encoding (as long as the used fonts supports the characters you are using)

> Throwing in PDType1Font.encode for chars above 255 is wrong.
> ------------------------------------------------------------
>
>                 Key: PDFBOX-3184
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3184
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: Maaartinus
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> Chars like `'\u2019'` can be handled by the code following the test, so throwing in `PDType1Font.encode` whenever `unicode > 0xff` is wrong. See
> [http://stackoverflow.com/a/34598915/581205]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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