Skip to main content
Participant
Dec 7, 2018 12:45 AM UTC
Answered

How can I permanently set the document on close action?

Hi

I have a lot of documents to be commented on with the draw free form tool and I wish for them to be flatted automatically after the user close the document.

I  can run "this.flattenPages();"  for ether 1) Document Actions at the Document Will Close in the JavaScript tools or 2) page properties -> actions -> Page Close -> Run a JavaScript.

But the problem is it will only work for one document I set this up in. Is it possible to set this up globally/permanently so every single document will run the code?

I am using Adobe Acrobat XI Pro

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 7, 2018 10:01 AM UTC

Are you aware that this command (flattenPages) doesn't work in Reader at all?

4 replies

Legend
Dec 7, 2018 1:28 AM UTC

There seems very little point doing this before document close. Whatever you do will be instantly lost when the document is, immediately after, closed.

Translate
Participant
Dec 7, 2018 1:42 AM UTC

ok well I guess there is some sort of order they cant close save and flatten all in one step?

what I would like would be

1 user opens the document

2 user adds the comment

3 automatically flattens the drawing into the document

4 user saves the document

5 user closes the document

would this be possible?

Translate
Bernd Alheit
Community Expert
Community Expert
Dec 7, 2018 5:08 AM UTC

You can use an Action for steps 3 to 5. Create the Action with the Action Wizard.

Translate