How can I permanently set the document on close action?

New Here ,
Dec 06, 2018

Copy link to clipboard

Copied

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

TOPICS
Acrobat SDK and JavaScript, Windows

Views

156

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Most Valuable Participant , Dec 07, 2018
try67 Most Valuable Participant , Dec 07, 2018
Are you aware that this command (flattenPages) doesn't work in Reader at all?

Likes

Translate

Translate
Jump to answer Jump to answer
Most Valuable Participant ,
Dec 06, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Dec 06, 2018

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Dec 06, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Dec 07, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more