These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Batch processing doclinks in pdf files?

gboehm
Registered: Dec 19 2007
Posts: 4

I am trying to use java script to create a batch process to create an array of numbers to search for in the text and when it finds it i would like to make it a link. I have got that far but when you try to use the lik if fails and does not take you anywhere. Console says link:Mouse Up?? searched on this and dont understand it. I tried several ways to figure it out so I would appreciate any help that anyone can give me on this issue. by the way here is the code snippet i am using....

for (var p = 0; p < this.numPages; p++)
{
var numWords = this.getPageNumWords(p);
for (var i=0; i

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You do not tell us what version of Acrobat/Reader you and your users are using. Since you are using the "addLink()" method, you have to be using version 6 or later. This is important because starting with version 5.5 the PDF being opened must have it's "disclosed" property set to "true". See the note in Acrobat's JavaScript documentation for the "app.openDoc()" method.

You will also need the referenced PDF in the same folder as the PDF with the link.

George Kaiser

gboehm
Registered: Dec 19 2007
Posts: 4
Sorry about that is is version 6.0 pro.

I would appreciate any help i can get this has been haunting me for like3 weeks and I am drawing a blank.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
1. Have you set the PDF's "disclosed" property to "true" for the file being opened by the JavaScript code?

2. Also you may have to edit the link before it will work. There have been a couple of instances using JavaScript to add code that will only work after the script opened and closed in an editor.

George Kaiser