Is there an automated way of adding a hyperlink that will work if you click anywhere on a PDF?
I have a PDF and a corresponding XML coming in. The XML contains a URL. I need to ad that URL to the PDF, so that it will work if you click anywhere on the PDF.
I can do this manually in Acrobat by adding a button with no fill and no stroke. Resize the button to the size of the entire PDF, and set the action of the button to open a weblink.
...but is there a way to automate this?
Hyperlink on a PDF
- JimmyHartington
- Advanced member
- Posts: 316
- Joined: Tue Mar 22, 2011 7:38 am
Re: Hyperlink on a PDF
I use the cpdf https://www.coherentpdf.com command-line (is free, but needs license to be used commercially) for some tasks.
It seem from the manual that you can set annotations in a pdf from a JSON-file.
So I think you could make a pdf manually in Acrobat with a link. Extract the information about annotations with cpdf.
Then you have a JSON-file you can use as a template to create the annotation dynamically and add it with cpdf.
It seem from the manual that you can set annotations in a pdf from a JSON-file.
So I think you could make a pdf manually in Acrobat with a link. Extract the information about annotations with cpdf.
Then you have a JSON-file you can use as a template to create the annotation dynamically and add it with cpdf.