Skip to main content
Participant
Mar 23, 2016 7:28 PM UTC
Question

I would like to automatically flatten document when dynamic stamp is applied.

Good afternoon,

I am looking to automatically flatten my document when I place a dynamic stamp. I am pretty new to Java and have cobbled together code to make my stamp, learning on the way.

I have tried adding this.flattenPages() to the script, but when I do Acrobat crashes when I place the stamp.

I cannot install the menu bar script to add a flatten document button, because I don't have admin permissions.

Thank you in advance for any help.

Patrick

This topic is closed to new replies. Start a new post to keep the conversation going.

25 replies

Inspiring
Mar 24, 2016 1:43 AM UTC

What version of Acrobat are you using?

Translate
patf_Author
Participant
Mar 24, 2016 12:04 PM UTC

Morning,

Acrobat 11.0.15

Translate
JoelGeraci_Datalogics
Participating Frequently
Mar 23, 2016 9:54 PM UTC

The Stamp script runs between the time that you click on the page and the stamp gets added to the page. If you try to flatten the page in that time... well... you see what happens.

However, if you put this.flattenPages() as the cExpr parameter in a setTimeOut method with (maybe) a 250 millisecond delay, it should work since the code won't execute until 250 milliseconds elapses.

J-

Translate
patf_Author
Participant
Mar 24, 2016 12:07 PM UTC

Thanks, I figured it was something like that. I will see if I can put in setTimeOut.


Thanks!

Patrick

Translate