Skip to main content
daitranthanhoa
Inspiring
February 6, 2018
Question

How set action type , if add a link?

  • February 6, 2018
  • 2 replies
  • 1308 views

I add a link to Page by JS:

l = addLink(p, [r2[4], r2[5], r2[2], r2[3]]);

l.borderColor = color.red;

l.borderWidth = 1;

l.setAction("this.pageNum = " + dctPageName[iPageGoto] );

Type of Action is: Run a Javascript:

How can set type of Action is [Go to a page in docment]?

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
February 6, 2018

You can do it using this tool I've developed: Custom-made Adobe Scripts: Convert JavaScript Links To Real Links

Joel Geraci
Community Expert
Community Expert
February 6, 2018

You can't.

The only Actions you can add via JavaScript is "Run a JavaScript". However, if you create a bookmark manually that goes to a specific page and view, you can execute the bookmark via JavaScript.

daitranthanhoa
Inspiring
February 6, 2018

Exist any solutions can process?

or other Libs?

Joel Geraci
Community Expert
Community Expert
February 6, 2018

Just about every PDF library tool will be able to create a link that is capable of setting any of the various link types. The one you choose depends on the platform, language, and price point you are comfortable with.