You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Simon Stratmann (JIRA)" <ji...@apache.org> on 2016/01/11 18:24:39 UTC

[jira] [Updated] (PDFBOX-3190) Links don't work in firefox

     [ https://issues.apache.org/jira/browse/PDFBOX-3190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Stratmann updated PDFBOX-3190:
------------------------------------
    Attachment: toctext.pdf

Links in the attached file don't work in Firefox.

> Links don't work in firefox
> ---------------------------
>
>                 Key: PDFBOX-3190
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3190
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.10
>         Environment: Windows, Firefox 46
>            Reporter: Simon Stratmann
>            Priority: Minor
>         Attachments: toctext.pdf
>
>
> I added links to the PDF I attached using the following code:
> {code:java}
> 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);
> {code}
> 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?



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