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

Delete a Watermark or OCG using Javascript/Batch

chachet
Registered: Apr 3 2007
Posts: 2

How can I delete a watermark or an OCG from Javascript?
 
Our company has used Acrobat 6 Pro to create numerous PDFs over the years. Most of these PDFs have an image watermark that has a transparency level of 0.18. We are testing for an upgrade to Acrobat 8 Pro and found that printing fails during the flattening phase when we try to print these PDFs using Acrobat 8 Pro. I've found that removing the watermark (Document>Watermark>Remove), then adding a new text watermark with a set color will allow the document to be printed properly.
 
I would like to write a script for use in a batch that will remove any existing watermarks or OCGs labeled as "Watermark", then add the new text-based watermark. It is simple to add a watermark or a OCG through javascript, but I can't seem to find any way of removing one.
 
Any ideas?

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately you are correct, you can't remove watermarks with either a batch process or JavaScript. You'd think it would have been so simple to add this feature when they added the remove watermarks menu item, but they didn't. Maybe next time.

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

systemsadminAS
Registered: Feb 26 2008
Posts: 2
Guys,

As of today, there is still no Adobe built-in way to do this, but another user found some trial products you can use to remove those pesky watermarks in batches.

Visit the following post to see my results with his method:

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=27180#p27180