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

Save prompt

mfulks1
Registered: Jul 13 2010
Posts: 7

I have a print button on a pdf that sets the needed printing settings. I also have this button creating a text field with a default value so that when the document is returned we will have an idea if user followed directions (i.e. used the custom made print button). My problem is that when the user closes the pdf it asks the user if they want to save. This document is individual to the user and will reside on our web server. It does not matter if it is saved or not, I just need that prompt to not come up. Is there a better way of making a small mark on a page when the custom print button is used that will not cause the save prompt? OR Is there a way to make the document automatically save so that this prompt does not come up.? It would be best for this to be done through script somehow because it is being concatenated through PlanetPress and loses document settings. The users of this document are not very computer literate. I am using 9 Standard and users will be using Reader. I am very much a newbie and any push in the right direction would be helpful.

My Product Information:
Acrobat Standard 9.0, Windows
Script Kitty
Registered: Jul 9 2010
Posts: 19
From page 277-278 of the javascript api reference: http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf

close the document you want to not prompt for like this: closeDoc(true);
"closeDoc:


Closes the document.
For Adobe Reader 5.1 or later, the method is always allowed:
●If the document was changed and no Document Save Rights S are available, the document is closed without any warnings and changes are lost.
●If Document Save Rights are available, the user has the option of saving the changed file.
It is important to use this method carefully, because it is an abrupt change in the document state that can affect any JavaScript executing after the close. Triggering this method from a Page event or Document event could cause the application to behave strangely.
In versions of Acrobat earlier than 7.0, a document that closes itself by executing this.closeDoc terminates any script that follows it. In Acrobat 7.0, the script is allowed to continue and to terminate naturally. However, if the Document Object of the closed document is referenced, an exception will be thrown.


Parameters

bNoSave
(optional) A Boolean indicating whether to close the document without saving:
●If false (the default), the user is prompted to save the document if it has been modified.
●If true, the document is closed without prompting the user and without saving, even if the document has been modified. Be careful in using this feature because it can cause data loss without user approval.