Adding XMP details to PDF File

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mmath1234

Adding XMP details to PDF File

Post by mmath1234 »

I would like to add some XMP details (like Autor & Keywords) to a PDF file. Im not sure of the syntax of the input file or the actual command. I think it would be something like convert -profile XMP:myxmp.xmp File.pdf. Any help woul dbe appreciated.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Adding XMP details to PDF File

Post by snibgo »

Your command syntax is good, but "XMP:" isn't needed if the file extension is "xmp".

The xmp file syntax is defined by Adobe, for example in http://www.adobe.com/devnet/xmp/pdfs/xm ... cation.pdf

The data you need in the xmp file will depend on your application. You might find an image file that does what you want, and extract the xmp data, eg:

convert image.png in.xmp

You can then edit in.xmp (with a text editor) and use that.
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Adding XMP details to PDF File

Post by snibgo »

Ah, I've just realised you want to add to pdf files. You should be aware that ImageMagic will rasterise the image (onvert it to pixels), which may be bad news for you.

IM isn't an ideal tool if you want to change metadata without changing the image, especially vector images.
snibgo's IM pages: im.snibgo.com
Post Reply