Skip to main content
Known Participant
November 21, 2016
Question

Need help modifying a little bit of javascript?

  • November 21, 2016
  • 0 replies
  • 247 views

I'm using Acrobat X on a Mac. I have this bit of javascript (see below). It does just the opposite of what I'm trying to do. I want to flatten the Stamps, Lines, Call-Out text boxes and any other type of annotation and not effect the buttons and input fields (or any other fields in the doc). Just flatten the annotations. Can someone help me out? Here's the script and a thank you.

Script:

this.syncAnnotScan();

var annots = this.getAnnots();

for (var i = 0; i < annots.length; i++) {

annots.print = (annots.type!="Stamp");

}

flattenPages(0,numPages-1,1);

this.syncAnnotScan();

annots = this.getAnnots();

for (var i = 0; i < annots.length; i++) {

annots.print = true;

}

This topic has been closed for replies.