It there a command line or GUI tools to dump information about ICC Profile/color conversion, which are set "Color management and PDF/X options for PDF" option of Illustrator's PDF export dialog?
"Color management and PDF/X options for PDF" option of Illustrator
[image] http://blogs.adobe.com/vikrant/files/2012/05/grayscale_export.png
Here is a command line based method to extract ICC color profiles from a PDF. It uses the Python script pdf-parser.py written by security researcher Didier Stevens which you can download here.
However, this tool is not a specialized tool for ICC extraction. (I do not know such a tool.) It is a generic command line tool to investigate PDF files.
Therefor you need to go through various steps in order to achieve the extraction.
Step 1: Determine the PDF object ID of the ICC profile
You have to use
-s
to search for the stringICCBased
. (PDF files without an embedded ICC profile will not have this keyword [with the exception of possibly using it in their text contents...].)My test PDF returned this:
It seems that an ICC profile is to be found in PDF object 21.
Step 2: Look at the PDF object found in step 1
You have to use
-o 21
to see what PDF object 21 is:My test PDF returns this:
Ok, this looks like we are getting close...
Step 3: Dump the stream contained in the PDF object containing the profile
In step 2 we acquired two important infos:
-o 21
parameter ofpdf-parser.py
)./FlateDecode
in order to get to its content.Hence we have to run
pdf-parser.py
now with two additional arguments:-d filename
in order to dump the stream of PDF object 21 to a file.-f
in order to filter/un-compress the object stream when dumping it to a file.pdf-parser.py -o 21 -f -d 21.stream my.pdf
Step 4: Verify what was extracted
We now have dumped the stream of PDF object 21 to a file named
21.stream
. Let's see what it contains:Looks like we succeeded. :-)
Step 5: Open the color profile
I'll see if my Mac OSX system does accept this profile:
OSX uses the 'Color Sync Utility' to open the file and display a window. Clicking on the list entries opens different information panes at the bottom of the window:
Step 6: Use Argyll's
iccdump
to dump the contents of the ICC profile as textNote, that Graeme Gill's ArgyllCMS, the open source color management software, available for Linux, Mac OSX and Windows, ships with a whole suite of command line tools. One of these is
iccdump
. We can use it to look at the properties of the newly won21.icm
file:P.S.:
ArgyllCMS contains a command line tool,
extracticc
, which can extract an embedded ICC profile from a TIFF file. It does not have a tool to extract a profile from a PDF file.