Solved

No Cache PDFs

Posted on 2007-11-26
3
3,634 Views
Last Modified: 2013-11-19
I am building a bunch of PDFs with fillable form fields for work.  I will host these PDF's online (company website).  I've already figured out how to clear these forms when they are loaded using the attached code.
This function works great when the PDFs are stored locally (on the computers hard drive) but I noticed when the PDFs are hosted online the data doesn't get cleared.  So if a user logs into a PDF from their web browser and then goes back into the PDF at a later point in time the data they entered into the form remains :(

How can I make sure the data doesn't get cached in a browser?

p.s. I am using "Adobe Acrobat Pro v7" to create these PDFs
// variable to store whether document has been opened already or not
var bAlreadyOpened;
 
function docOpened()
{
 
  if(bAlreadyOpened != "true")
  {
    // document has just been opened
    this.resetForm();
    // now set bAlreadyOpened to true so it doesn't
    // run again
bAlreadyOpened = "true";
  }
  else
  {
    // document has already been opened
  }
}
 
// call the docOpened() function
docOpened();

Open in new window

0
Comment
Question by:basskozz
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 20364533
There is a setting in Adobe Reader/Adobe Acrobat that determines if a form gets cached locally. You have to set this on every computer that you want to use the form. Open up Acrobat's preferences and go to the "Form" category. Uncheck the setting "keep forms data temporarily available on disk".

You could add some logic to your form that determines when the form was last used (e.g. save a date in a hidden form field). If the date is older than the current date, ask the user if they want to clear the form data. Other than that, you need access to your clients computers, or instruct them to uncheck that setting manually.
0
 

Author Comment

by:basskozz
ID: 20393846
Nevermind...
I found this: http://support.adobe.com/devsup/devsup.nsf/docs/53773.htm


this.nocache = true;

Open in new window

0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 500 total points
ID: 20395296
Just keep in mind that this property was introduced in Acrobat 7, so for any older version of Acrobat or Reader, it's still necessary to use the setting in preferences.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question