My client has a coorporation with several computers that hourly access pdf documents from a repository. These documents have links to other pdfs, to places inside the document, and to external pages. Some of them are broken or point to a wrong place. Today Im starting to deal with acroJS as a possible solution to handle clicks to avoid the problem.
One possible solution is to install a .js that detects clicks on urls in every machine in the directory "C:\Program Files\Adobe\Reader 9.0\Reader\Javascripts". This script should be able to identify the url and decide whether to go to the original url or to go a different place. Something like this.
// begin pseudo javascript of what I would like to do: function onSomebodyClickedAlinkInsideAPDF(url){ if(url_is_wrong(url)){ browser.location ="http://www.google.com" }else{ // if url is ok, we go to the original url browser.location =url } }
The first thing I need to find out is : is this possible whithout modifying any pdf file? just by puting a a javascript in that directory?
I think they are probably "plain" http links pointing to different locations. In that case you can't capture or change their destination with JS.
The only way to do it is to replace all of them with a JS script that calls your global function.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com