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?
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script