Skip to main content
Participant
Jun 11, 2020 11:42 AM UTC
Question

Using the API To Create Hyperlinks

Can I use the API to add hyperlinks in the document to areas within that same document? That is, can the API  replicate/replace the functionlaity of the Link tool?

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Joel Geraci
Community Expert
Community Expert
Jun 11, 2020 2:55 PM UTC

Since you've tagged the question with Acrobat SDK and JavaScript, I'll assume you mean JavaScript but the Acrobat C++ API can do so as well. So...Yes.

For JavaScript, you can see an example here which shows how to add a link, set the action to perform when clicked and set the appearance properties.

Translate
Bernd Alheit
Community Expert
Community Expert
Jun 11, 2020 1:35 PM UTC

What API?

Translate
dkrumholzAuthor
Participant
Jun 11, 2020 1:53 PM UTC

I was under the impression that Datalogics, ActivePDF, and Foxit all had SDKs which would provide that capability. Is that not correct?

Translate
Legend
Jun 11, 2020 2:08 PM UTC

You would need to ask ActivePDF and Foxit about their APIs. Datalogics license the Acrobat Library from Adobe, so it is on topic here. This offers a C++ library (and some other language ports). This can be used, by users who have some knowledge of internal PDF concepts and structures (not too much for this task), to create what in PDF terms is a "Go To Link" from an area on one page to an area on another page, specifying the zoom option. Reading around PDAction and PDAnnot in the API would be a start though you'd also need to know about PDDoc and PDPage objects, among others. (These are API abstractions, not names in the PDF specification).

Translate