Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3913

Japanese URI improperly decoded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.7
    • 2.0.8, 3.0.0 PDFBox
    • PDModel
    • None

    Description

      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

      //..
      //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());
      
      

      Attachments

        1. business.pdf
          189 kB
          Roman

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              rmakarov Roman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: