Solved

No Cache PDFs

Posted on 2007-11-26
3
3,631 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This video teaches users how to migrate an existing Wordpress website to a new domain.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now