I'm an ad designer for a newspaper. We get all kinds of pdfs from hack "artists". Making sure the incoming pdfs travel to the our printer as totally gray (no RGB elements, no hidden spot colors, etc.) is just a little time consuming. I'm imagining Java Script can place a button in the toolbar to accomplish total document color conversion to grayscale, so the document can be saved corrected.
Or do I have to build my own Color Management Module?
Color conversion first. There are a couple of ways to approach this.
1. In Acrobat 8, color conversion was added to the JavaScript model. It uses the colors profiles defined in "app.printColorProfiles" to convert lines, images, text, etc. into different color spaces. The script is only a few lines of code, but you need Acrobat 8.
2. Instead of converting the PDF document, print it to gray using the "doc.print()" function. This function takes the "PrintParams" object as input. This object cantains paramenter for converting colorspaces ("colorProfile" ) and for just converting to grayscale ("colorOveride"). Both of these properties were added in Acrobat 6.
Look up the "doc.colorCovertPage()" and "doc.print()" functions and thier associated parameters in the Acrobat JavaScript Refence,
http://www.adobe.com/devnet/acrobat/javascript.php
Now, for creating a toolbar button. The simple way to create a button with text on it is outlined in this article:
http://www.acrobatusers.com/tutorials/2007/10/apply_security_with_js/
If you want cool looking and easy to identify buttons with icons on them, then check out the AcroButtons plug-in.
http://www.windjack.com/products/acrobuttons.php
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script