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

HTTP Post in a PDF

leithfx
Registered: Dec 6 2007
Posts: 28

When I do an HTTP Post from a PDF that is opened within Reader itself (as opposed to through a browser), the page that gets returned is cached locally and then rendered from there. Is there anyway around this? This prevents me from have the site it is posted to take control and act as a seamless web application. Any tips? (The functionality works fine when it is within the browser, but I obviously cannot guarantee that it will be). I would like to stay compatible with 7.0 (or maybe 7.0.5?) if at all possible.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There is a Document Level JavaScript property for disabling form data cacheing. Data handling is what you are doing, but I'm not sure if this will fix the problem, since you imply this has to do with HTML, and not data, returned to Acrobat. But try this

Place this code in a document script

this.nocache = true;

You can detect wether the PDF is open in a browser or Acrobat with the "external" property.

For example, place this doce in a document or page open script:

if(!this.external)
app.alert("Form must be used from within a browser");

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

leithfx
Registered: Dec 6 2007
Posts: 28
Hi Thom,

I am already using the nocache thing, but to my understanding it was so it didnt cache the PDF itself anywhere. In LiveCycle, I am doing the following:

var oDoc = event.target;
oDoc.nocache = true;

Anyway, this certainly isnt changing how the page is returned after the POST. Is there anything else I can try here?

I would like my application to work like this from a users perspective: log into website -> open a form -> hit save -> return to website. This works if the PDF is in the browser, but not all users are set up that way. I can do a workaround like you've suggested, but I am tired of doing workarounds in my PDF solution. Any other advice?
leithfx
Registered: Dec 6 2007
Posts: 28
Any other expert care to shed some light on why in renders HTML pages as locally cached files??

Andrew