Details
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?