You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Roman (JIRA)" <ji...@apache.org> on 2017/09/01 07:06:00 UTC

[jira] [Commented] (PDFBOX-3913) Japanese URI improperly encoded

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

Roman commented on PDFBOX-3913:
-------------------------------

From the perspective of our software, it should not work worse than Acrobat Reader, where this link is clickable and opens correct URL. Of course, we can achieve this by updating our code and use this new method, or even use approach from last line of description. But I think the code would look more clear if we could simply use *getURI()* function and get "good" result, same as in Acrobat.

> Japanese URI improperly encoded
> -------------------------------
>
>                 Key: PDFBOX-3913
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3913
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.7
>            Reporter: Roman
>         Attachments: business.pdf
>
>
> *PDActionURI.getURI()* function returns bad result for the first link annotation in the attached document [^business.pdf] (this doc works fine in Acrobat Reader).
> We are using PdfBox 2.0.5
> {code}
> //..
> //Iterates by all annotations on the first page of doc, searches for first annotation of type PDAnnotationLink
> //..
>   PDAnnotationLink link = (PDAnnotationLink) annotation;
>   PDAction action = link.getAction();
> //this would return buggy result: http://組匶替綎.com/
> String badURI = ((PDActionURI) action).getURI();
> //although, here fine result is returned: http://経営承継.com/
> String goodURI = new String(((COSString)action.getCOSObject().getDictionaryObject("URI")).getBytes());
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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