You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Staley, Stephen" <St...@oneonta.edu> on 2016/01/06 15:52:10 UTC

Adding a link to a PDF

Hello,
I'm new to using the PDFBox API. Is it  possible place a link to a web site in a PDF you create using this API? For example, could you create a button that when clicked opens a web browser to a specified URL. If so, which package should I begin looking at to accomplish this?

Thanks,
Stephen

RE: Adding a link to a PDF

Posted by "Staley, Stephen" <St...@oneonta.edu>.
This works great. I write an image to the PDF and then use setRectangle for PDAnnotationLink with coordinates that outline the image and the image basically becomes a button. Thank you.

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Wednesday, January 06, 2016 12:51 PM
To: users@pdfbox.apache.org
Subject: Re: Adding a link to a PDF

Am 06.01.2016 um 15:52 schrieb Staley, Stephen:
> Hello,
> I'm new to using the PDFBox API. Is it  possible place a link to a web site in a PDF you create using this API? For example, could you create a button that when clicked opens a web browser to a specified URL. If so, which package should I begin looking at to accomplish this?
>
> Thanks,
> Stephen
>

Have a look at the AddAnnotations.java example. There, search for the segment with  PDAnnotationLink

Tilman

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


Re: Adding a link to a PDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 06.01.2016 um 15:52 schrieb Staley, Stephen:
> Hello,
> I'm new to using the PDFBox API. Is it  possible place a link to a web site in a PDF you create using this API? For example, could you create a button that when clicked opens a web browser to a specified URL. If so, which package should I begin looking at to accomplish this?
>
> Thanks,
> Stephen
>

Have a look at the AddAnnotations.java example. There, search for the 
segment with  PDAnnotationLink

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org