You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Nikhil Chhaochharia <ni...@yahoo.com> on 2011/02/23 05:55:21 UTC
Insert an image with a link in a PDF
I have multiple PDFs and I want to insert a logo on every page which links to
http://xyz.com (that is, clicking on the logo opens xyz.com in the browser).
Also, I want to insert some text 'Click Here to view this page at xyz.com' next
to the logo where 'Click Here' is a link (different link on every page, like
http://xyz.com/show.php?id=76&page=3)
I have been able to add the logo and the text (using the examples in the PDFBox
source code) but could not figure out how to add links to the text & image. Is
it even possible to do something like this using PDFBox? Any pointers in the
right direction will be most helpful.
Thanks,
Nikhil
Re: Insert an image with a link in a PDF
Posted by "Hesham G." <he...@gmail.com>.
Nikhil ,
Please check this example :
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/Annotation.java?revision=924515&view=markup
Hope that helps.
Best regards ,
Hesham
---------------------------------------------
Included message :
> I have multiple PDFs and I want to insert a logo on every page which links
> to
> http://xyz.com (that is, clicking on the logo opens xyz.com in the
> browser).
> Also, I want to insert some text 'Click Here to view this page at xyz.com'
> next
> to the logo where 'Click Here' is a link (different link on every page,
> like
> http://xyz.com/show.php?id=76&page=3)
>
> I have been able to add the logo and the text (using the examples in the
> PDFBox
> source code) but could not figure out how to add links to the text &
> image. Is
> it even possible to do something like this using PDFBox? Any pointers in
> the
> right direction will be most helpful.
>
> Thanks,
> Nikhil
>