Traversing the XMP metadata

Started by spawnit, April 05, 2016, 10:04:02 PM

Previous topic - Next topic

spawnit

Hi there, I was hoping someone could help me by providing an example for extracting kids metadata from a PDF using the Command Line. For example: How do you get metadata from kids tags for 1 or many pages of a PDF?

I would like to get color information and mediabox coordinates if possible. Thanks in and what a great app, very powerful  :D

Phil Harvey

Here is a list of the information extracted by ExifTool from the PDF Kids object.

Generally, ExifTool extracts only top-level metadata from PDF files, but adding the -ee option enables ExifTool to extract some more information from embedded objects.  Use this command to see the full PDF structure:

exiftool -v FILE

or this command to see all the tags that ExifTool will extract from a PDF image (this is FAQ 3 plus the -ee option):

exiftool -a -G1 -s -ee FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

spawnit

Hi Phil,

Thank you so much for your reply, getting a lot more information doing now.

I am very new to command line scripting and am doing my best to understand the documentation but struggling some what.

Hate to be a pain but is there a way to extract specific information for example, if I wanted to get the PlateNames from this line of the metadata:

[XMP-xmpTPg]    PlateNames                      : Cyan, Magenta, Yellow, Black

Dan

Hayo Baan

Quote from: spawnit on April 16, 2016, 12:09:20 AM
Hate to be a pain but is there a way to extract specific information for example, if I wanted to get the PlateNames from this line of the metadata:

[XMP-xmpTPg]    PlateNames                      : Cyan, Magenta, Yellow, Black

To extract certain tags, simply specify them on the command line e.g., like so:
exiftool -platenames FILE
(Tag names are not case sensitive)
Hayo Baan – Photography
Web: www.hayobaan.nl

spawnit

#4
Hi Hayo,

I tried your suggestion but it did not return anything?

EG: exiftool -platenames /Users/Dan/Desktop/PDFs/Business.pdf

Dan

StarGeek

I'd guess that the PlateNames were embedded objects.  I had similar empty result when I ran that command on a bunch of random PDFs, but when I added -ee, PlateNames showed up.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

StarGeek is correct.  The command should be:

exiftool -ee -platenames /Users/Dan/Desktop/PDFs/Business.pdf

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

spawnit

Hi Phil,

Thanks for taking the time :D

That worked perfectly and now I even understand your first post better, penny finally dropped on the -ee tag and how to use it.

Dan