Create custom XMP tag

Started by Nik, June 20, 2016, 05:01:25 AM

Previous topic - Next topic

Nik

Hi guys,

Could somebody please give me some tips on how I could create a custom XMP tag in a PDF?

Currently when I look at the Additional Metadata... of a PDF in Acrobat it displays the following XMP tags:

Description
Camera Data 1
Camera Data 2
Categories
History
Illustrator
Adobe Stock Photos
IPTC Contact
IPTC Image
IPTC Content
IPTC Status
Advanced

I would like to add another tag called: AMP that I could use to add a text field to. The purpose of the text would be to keep track of all of the modifications I've made to the file like the original filename, Dates, processes the pdf had been through. Is this possible?

I've read lots of posts that indicate I need to reference a config file that contains instructions on how to create the tags but I'm unclear on how to do this.

I currently run ExifTools on a mac via the command line.

Many Thanks,
Nik

Phil Harvey

...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 ($).

Nik

Hi Phil,

many thanks for your reply.

I've downloaded the example file and saved it as test.cfg, can I then just use this file to create a custom tag NewXMPxmpTag in my pdf by running something like this:

exiftool -config test.cfg path/to/my/file.pdf

or is there something else I need to do?

Thanks,
Nik

Phil Harvey

To create a tag you need to assign a value on the command line, like this:

exiftool -config test.cfg -NewXMPxmpTag="some value" path/to/my/file.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 ($).

Nik

Hi Phil,

I just added AMPxmpTag => { Groups => { 2 => 'Author' } }, to the current config and then ran:
exiftool -config test.cfg -AMPxmpTag="some value" path/to/my/file.pdf and I can now see under the Advanced xmp tag an entry so thanks for that.

Could I please ask you to explain what AMPxmpTag => { Groups => { 2 => 'Author' } }, line is doing?

Also is there any limit/restrictions to the text that can be inserted into this tag?

Thanks,
Nik

Phil Harvey

Hi Nik,

When reading, ExifTool has groups to categorize the tags in different ways.  The "Groups => { 2 => 'Author' }" just sets the family 2 group to "Author".  See here for a description of the groups.   It has no effect on what is written.

There are no limits to the text you may insert in this tag.

- 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 ($).

Nik

Hi Phil,

many thanks for your help with this,

Nik