I have a folder full of pdf documents. i’m trying to list all the spot colors in those pdf (if there are any) and save it as a tab delimited file. in this manner
If you open a pdf and go to output preview, it will show you “Process Plates” and “Spot Plates” Things listed under process plates would be “Process Cyan, Process Magenta, Process Yellow, Process Black” and under Spot plates you’;d find something like “FL_Cyan”. I would like the script to list all that is listed under Spot plates.
I have tried this in the past with no luck. Acrobat does not have a great deal of applescript support and I found it easier to use a layout program such as InDesign. You could write a script that places the pdf in a blank InDesign document and then it’s easy to find spot colors.
tell application "Adobe InDesign CS3"
tell document 1
set myColors to name of every color
end tell
end tell
I’m on a PC right now so can’t work up anything at the moment. What I would do is read the file into a variable and parse the resulting text for DocumentCustomColors: in the PDF header. Looking at one in a text editor with a PDF 3.1 compatible file it will be prefaced by " and get the second text item then reset the delimiters to "%%RGB and end in %%RGBCustomColor: . So if you set your text item delimiters to "%%DocumentCustomColors: " and get the second text item then reset the delimiters to "%%RGBCustomColor: " and get the first text item you have the custom colors in the PDF document. To make into a list set the delimiters to “%%+” which seperates the items and get every text item.
You will probably have to play around with it a bit to finess it and make sure that it is working with the PDF version that you have. I’m looking at the text opened in Word 2003 which might be interpreting some of the ASCII code wrong. If you open a sample PDF in text wrangler or BB Edit or just load it into a variable and look at the result you should be able to find what you need.