Skip to main content
Participant
June 11, 2020
Question

Using the API To Create Hyperlinks

  • June 11, 2020
  • 2 replies
  • 804 views

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 has been closed for replies.

2 replies

Joel Geraci
Community Expert
Community Expert
June 11, 2020

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.

Bernd Alheit
Community Expert
Community Expert
June 11, 2020

What API?

dkrumholzAuthor
Participant
June 11, 2020

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

Legend
June 11, 2020

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