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

Updating Weblinks to change URL

dan.henne
Registered: Oct 30 2008
Posts: 2

Okay I have been through the VB, C# and Javascript examples. I must be missing something.

I have 2500 pdf documents that I need to update the URL's in the weblinks. I need to automate this process. I can count the number of links on a page, I can get the color, but I can't seem to be able to get the contents of the weblinks. I know I can add a weblink but what I really need to do is read the weblink, check it and then change it.

Am I trying to do something bizarre here? I tried looking at the Annotations and looking at contents but it keeps coming back empty.

Any suggestions?

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately you are not missing anything. From the light Acrobat APIs, JavaScript and the IAC, the contents of a link are not accessible. The annotation "contents" property is for the text in markup annotation. It doesn't have anything to do with a link.

I think this was originally a security concern for in-document scripts. But it should be something that an automation script can do. Lots of people have the same concern.

You're only option is to go with a 3rd party tool or write a custom plug-in. There are lots of 3rd party linking tools. I don't know for sure but maybe one of them has the features you need.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script