Hi,
I am researching a little bit on JavaScript embedded in the PDF files prior developing some application.
I am particularly interested in communication using JavaScript between HTML and PDF. I know that it is possible to call postMessage from HTML JavaScript to send provided message to the PDF file that can handle it and behave accordingly if some message handler has been coded in JavaScript within that PDF.
I was wondering is it possible and if yes, how, to trigger some particular behavior on PDF file from HTML page request, but with not having to embed a JavaScript into PDF file.
For example, I would like to let users visiting my website specify to which page within the PDF file they want to jump to (giving them a link that they can click on and the page would be shown).
I was thinking of having a folder level script with registered message handler on the server side (with PDF files etc.) that would then handle specific message sent from HTML JavaScript and call function to jump to that page in the PDF.
I am not sure will that work and is actually my understanding correct.
I know it is possible to jump from page to page in the PDF file by adding extra information to the URL, however I don't want to reload entire document every time, I'd like to load it once and be able to jump to any page (I think Adobe JavaScript API has got something like that) just the question is, how to synchronize it nicely with requests coming from HTML JavaScript.
I would prefer to avoid embedding JavaScript into PDF files, so I'm looking for ways how to bypass this.
Could anyone please help me clarify this issue. It is probably a bit unclear at times, so please ask, I'll try to explain it in more unambiguous way.
Thanks,
Michael
You might look at using a document level script and the Soap objects.
George Kaiser