Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 1.8.11, 2.0.0
    • Fix Version/s: 1.8.11, 2.0.0
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      Windows, Firefox 46

      Description

      I added links to the PDF I attached using the following code:

      PDPageXYZDestination destination = new PDPageXYZDestination();
              destination.setPage((PDPage) doc.getDocumentCatalog().getAllPages().get(0));
              //destination.setPageNumber(0); //TODO Set actual page number
              destination.setLeft(0);
              destination.setTop((int) PAGE_HEIGHT);
      
              PDAnnotationLink link = new PDAnnotationLink();
              link.setAction(new PDActionGoTo());
              link.setDestination(destination);
              link.setInvisible(false);
              PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();
              borderThick.setWidth(0f);
              link.setBorderStyle(borderThick);
              page.getAnnotations().add(link);
      
              PDRectangle rect = new PDRectangle();
              rect.setLowerLeftX(MARGIN_LEFT);
              rect.setLowerLeftY(textLowerLeftY);
              rect.setUpperRightX(PAGE_WIDTH - MARGIN_RIGHT);
              rect.setUpperRightY(textLowerLeftY + TEXT_HEIGHT);
              link.setRectangle(rect);
      

      See the attached file.

      The links work fine in Sumatra PDF, Adobe Reader DC 2015 and in Chrome. But in Firefox they don't work.

      Is this due to an error in my code, in Firefox or in PDFBox?

        Attachments

        1. toctext_modified.pdf
          58 kB
          Tilman Hausherr
        2. toctext.pdf
          58 kB
          Simon Stratmann

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              simonstratmann Simon Stratmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: