Expand my Community achievements bar.

Automatically save PDF on close

Avatar

Level 2

How do I keep the pdf from asking the user if they want to save the file when I close the document?

I have used "event.target.dirty = false; " in just about any event that might make sense.

What am I missing?

1 Reply

Avatar

Level 10

Hi,

I would have guess that preSave would be the right place, but the dialog seems to be called before that.  If you only need to support Reader 9.1 or later you could use event propagation and clear the flag on every exit event.

Here's a sample https://sites.google.com/site/livecycledesignercookbooks/home/Clear%20Dirty%20Flag.pdf?attredirects=...

Bruce