Hi,
I'm new to Exifttool and to the forum... I'm simply wanting to read the ICC profile in a pdf file. I've tried using:
exiftool -profiledescription filename.pdf
but nothing is displayed. The same command works as expected for .jpg files.
My questions are:
- Am I using the incorrect tag?
Is it not possible to extract the ICC profile used in a pdf file using Exiftool?
Many thanks
ExifTool extracts ICC Profile information from some PDF files, but it isn't very common that this type of ICC is stored in a PDF. It could be that there is a more common place for the ICC that Exiftool isn't extracting. Can you see if it is there with the -v option?
- Phil
Hi Phil,
Thanks for your reply... I've embedded the ICC profile in the pdf myself which is why I was hoping to be able to 'read' it using Exiftool but to date, I've not found a way to do this.
Using the -v option the only reference I see to ICC is a line that says DefaultCMYK = [/ICCBased.ref(3 0 r)]. I'm unsure what this means in practice? ;)
When you say that Exiftool extracts ICC Profile information from some PDF files, are there specific pdf formats required for this, e.g. pdf 1.7?
Send me a sample and I'll take a look. There is no requirement on the PDF version. The question is just where is the profile stored.
- Phil
Hi Phil,
Thank you, that's extremely kind of you... I've attached three pdf's, they are basically the same file, one with no embedded ICC profile, the other two with different embedded ICC profiles.
Many thanks
OK. This turned out to be a real pain because for some reason the DefaultCMYK profile is stored in an array instead of a dictionary as the DefaultRGB profiles are. I have hacked a patch for this and added the ability to extract the ICC profile from the files you sent. This ability will appear in ExifTool 11.66 when it is released.
- Phil
Hi Phil,
That's fantastic, thank you so much... I'm glad I wasn't going mad trying to find them in the meantime... Will the logic be the same, as in, are you proposing a new command will be required or will this work by using something like exiftool -profiledescription filename.pdf
I look forward to 11.66.
Many thanks
The command will be the same.
- Phil
That's perfect, thank you once again :)
ExifTool 11.66 is now available.
- Phil
That's perfect and thanks for letting me know, much appreciated...
I will download and give it a go.
All working perfectly, many thanks for the update, that is going to be extremely helpful.
Out of interest, is there any way to extract the Image Width and Image Height from a pdf file or are these also not easy to access?
exiftool -ExifImageWidth -ExifImageHeight filename.pdf returns nothing, unlike exiftool -ExifImageWidth -ExifImageHeight filename.jpg
Great.
PDF files don't really have a pixel width/height since they typically are not raster images.
- Phil
Would you not expect to see a page size (so effective width and height) in pts rather than px's for a pdf?
The individual pages would likely have some information similar to this, but the pages may be different sizes.
- Phil