The script I need to add to our templates (sometimes) provides a listener that allows a containing HTML page to post a simple string message (like 'Submit') that tells the PDF to submit itself.
I do not want to permanently add the document-level script with by copy/pasting or some automated/batch technique. I only want to add this document level script when the PDF is embedded in a container such as an HTML page.
I have seen the technique of adding folder-level .js files which would appeared as a solution at first, except that it would be adding the script when not needed in some cases, and the folder-level technique appears to be appropriate only for the app level context, so it will not provide a solution to my requirement anyway, which is at the doc level.
We use AP Toolkit on the server side to generate the PDFs but I do not see a way to accomplish what I need to do with that, either.
I have researched heavily to find a solution and have come up empty. Is there a solution to this problem?
OK; If I do have to touch every single file in order to add my document level script, is there a way to include a .js file (or equivalent) instead of hardcoding, so that if I have to change code later, I don't have to change it in hundreds of places? I could not find any such way.
If so, are there Reader version limitations I should be aware of?