These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Markup Background Changing

CJDJ
Registered: Feb 11 2007
Posts: 6

Hello again, I asked te below question previously, and Thom Parker replied. I appreciate the quick reply, but the Javascript command was incomplete. Could someone please finish it? Thanks again!
 
(Original Question): I'm trying to find a way to automatically change the background colour in all my Markups from Yellow to White. If I have a 300 page PDF document, I don't want to manually change each one. Please help! Thanks in advance!
 
A:This is a simple task in JavaScript. Enter the following script into the JavaScript Console.
 
var annts = this.getAnnots();
 
for(var i=0;i

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Sorry about that, I didn't use a code block so it interpreted the LessThan symbol as formatting.

Here's the code again

var annts = this.getAnnots();for(var i=0;i

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Sorry about that, I didn't use a code block so it interpreted the LessThan symbol as formatting.

Here's the code again

var annts = this.getAnnots();for(var i=0;ii++)annts.fillColor = color.yellow;
You can change any anntotation property this way. Please look over the Annot object in the Acrobat JavaScript Reference.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Let's try for #3

var annts = this.getAnnots();for(var i=0 ; i\

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Ok, that didn't work. But all the code is there in one of the previous posts. You'll just have to write the "for" statement correctly.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script