pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jana Sefcikova <jsefcik...@capso.com>
Subject Re: How to add annotation that opens url in new tab/window ?
Date Tue, 26 Apr 2016 09:12:27 GMT
Hi Maruan,

thank you for your response.

Where this code can be placed ? Somewhere in GUI or it can be done
programatically ? What is app ?

Thank you

ps: I am first time replying to this mailing list, and I am not sure
whether this answer will be correctly placed under original discussion, as
I don't know who should be recipient


On Sat, Apr 23, 2016 at 6:55 PM, Maruan Sahyoun <sahyoun@fileaffairs.de>
 wrote:

> Hi,
>
> > Am 23.04.2016 um 19:47 schrieb Tilman Hausherr <THausherr@t-online.de>:
> >
> > Hi,
> >
> > If you download this PDF
> >
> https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
> > open it, then go to the second page, and click on the link, what happens?
> >
> > (I suspect this is rather a problem of the browser or an Adobe Reader
> setting)
> >
> > Tilman
> >
> > Am 23.04.2016 um 13:27 schrieb Jana Sefcikova:
> >> Hi, I am using pdfbox to create links inside pdf as follows:
> >>
> >> PDAnnotationLink txtLink = new PDAnnotationLink();
> >>
> >> // code for setting position
> >>
> >> PDActionURI action = new PDActionURI();
> >>
> >> action.setURI("http://www.google.com");
> >>
> >> txtLink.setAction(action);
>
>
> a regular link annotation doesn't have the capability. What you can do is
> adding a JavaScript with the following content
>
> app.launchURL("http://yoururl", true);
>
> replacing <yoururl> with the actual one.
>
> Be aware that this JavaScript is application specific so might not work in
> Readers other than Adobe Reader / Acrobat.
>
> BR
> Maruan
>
>
> >>
> >> But when I open pdf in browser and click on the annotated text, it opens
> >> url in the current tab in the browser.
> >>
> >>
> >> Can I open links in new tab using pdfbox ? If yes, could you provide
> some
> >> example ?
> >>
> >> Thank you very much
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
On Sat, Apr 23, 2016 at 6:55 PM, Maruan Sahyoun <sahyoun@fileaffairs.de>
wrote:

> Hi,
>
> > Am 23.04.2016 um 19:47 schrieb Tilman Hausherr <THausherr@t-online.de>:
> >
> > Hi,
> >
> > If you download this PDF
> >
> https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
> > open it, then go to the second page, and click on the link, what happens?
> >
> > (I suspect this is rather a problem of the browser or an Adobe Reader
> setting)
> >
> > Tilman
> >
> > Am 23.04.2016 um 13:27 schrieb Jana Sefcikova:
> >> Hi, I am using pdfbox to create links inside pdf as follows:
> >>
> >> PDAnnotationLink txtLink = new PDAnnotationLink();
> >>
> >> // code for setting position
> >>
> >> PDActionURI action = new PDActionURI();
> >>
> >> action.setURI("http://www.google.com");
> >>
> >> txtLink.setAction(action);
>
>
> a regular link annotation doesn't have the capability. What you can do is
> adding a JavaScript with the following content
>
> app.launchURL("http://yoururl", true);
>
> replacing <yoururl> with the actual one.
>
> Be aware that this JavaScript is application specific so might not work in
> Readers other than Adobe Reader / Acrobat.
>
> BR
> Maruan
>
>
> >>
> >> But when I open pdf in browser and click on the annotated text, it opens
> >> url in the current tab in the browser.
> >>
> >>
> >> Can I open links in new tab using pdfbox ? If yes, could you provide
> some
> >> example ?
> >>
> >> Thank you very much
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message