Copy link to clipboard
Copied
Hi Everyone,
I created a form for clients to fill. This form has 2 pages. The first page I would like to lock or flatten the data submitted once I am done my review and stamp it and not have the second page locked so that others can complete the second page of the form and sign off.
I have Acrobat DC Pro.
Can I use the java scipt "this.flattenPages(); " and have it only flatten the first page? Is there addition code I can use to limit the range of flatten?
I cannot use any add-ons and I am restricted to what I have for software.
Thanks in advance.
If you want to flatten just one page (lets say page 2) use like this:
this.flattenPages(1);
if you want to flatten range of pages lets say 1-3:
this.flattenPages(0,2);
Thank you this worked.
To flatten page 1 I used: this.flattenPages(0);
Copy link to clipboard
Copied
Yes, the "flattenPages()" function has inputs for start page and end page. So you can flatten any page range you want.
Here's the reference entry:
However, this function will only work in Acrobat Pro. It will not work in Acrobat Reader, or pretty much any other PDF viewer. I would suggest that you make the fields ReadOnly instead.
Another alternative is to use the Adobe Sign process, which allows fine control over the form distribution process, but unfortunately is pretty weak on the actual form fields and doesn't allow any scripting.
Copy link to clipboard
Copied
this.flattenPages({nStart: 0, nEnd: 0});
this.flattenPages({nStart: 0, nEnd: 1});
this.flattenPages({nStart: 1, nEnd: 1});
All result in flattening every page, any suggestions?
Copy link to clipboard
Copied
That should not be the case. Can you share the actual file with us (before you flattened it, of course)?
Copy link to clipboard
Copied
I'll have to redact a bunch of items.
In the mean time ill give a better break down of what I tried:
1. I have a email button, and added an extra "action" to run a javascript with the flatten commands. I assumed acrobat didnt like this then
2: New button with no other associated actions.
And to be Specific about which version I have: Adobe Acrobat DC (21.005.20060)
Copy link to clipboard
Copied
If you want to flatten just one page (lets say page 2) use like this:
this.flattenPages(1);
if you want to flatten range of pages lets say 1-3:
this.flattenPages(0,2);
Copy link to clipboard
Copied
Thank you this worked.
To flatten page 1 I used: this.flattenPages(0);