Add/Updating classic IPTC in PDF files - not working?

Started by Mac2, October 15, 2013, 10:06:32 AM

Previous topic - Next topic

Mac2

Hi,

exiftool.exe on Windows 7, latest version.

I tried to set the IPTC headline (and other tags) for a PDF document as follows:

exiftool -v5 -overwrite_original -iptc:headline=bla "test.pdf"

The output:

Writing IPTC:Headline
======== test.pdf
Rewriting test.pdf...
  Rewriting XMP
Nothing changed in test.pdf
    0 image files updated
    1 image files unchanged


http://www.exiftool.org/TagNames/IPTC.html lists PDF as a supported format.

What can be the reason for this failure?

Phil Harvey

Ah.  Very smart... Using my own documentation against me! ;)

Yes it is true that Adobe Photoshop writes IPTC in a private section of PDF images.  ExifTool reads this information, but does not write it.  I would be surprised if anything else could read it though.  You are much better off using XMP in PDF.

But you are right that the documentation isn't very good when it comes to explaining what types of information may be written to files other than JPEG images.  I will change the wording in the IPTC documentation because "embedded" does imply the ability to write (I will change this to "found").  Also, I will change the PDF documentation to explicitly state the information types that may be written to PDF files.

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

Mac2

Hi, Phil

this is valuable information and solves my problem. I need to change my application to handle this  :)

My software always struggles with determining which metadata format can be contained in a file, or be written to a file. I use a mix of the listwf output and info gathered from the ExifTool documentation - but that goes only so far.

What I would need is a per "group0 / format" information, telling me which file extensions can contain metadata of that type, and much more important, to which file extensions ExifTool can write data in that format. For example:

IPTC
read: {JPG, TIFF, PNG, MIFF, PS, PDF, PSD, XCF, DNG}
write: {JPG, TIFF, PNF, ...???}


I'm sure ExifTool knows that, but currently there is no way to extract that information. Would it be possible to extend maybe listwf to something like

listwf [Group]  Return all file extensions to which data in format Group can be written (where Group means something like IPTC, EXIF, XMP, ...)

listf [Group] Returns all file extensions from which data in format Group can be read.
This info is important when a software runs the ...2XMP.args files and needs to know if a file can have IPTC, EXIF or GPS data. No need to run the args files if the file can contain only XMP data.

I'm mostly interested in XMP, IPTC, EXIF, GPS, PDF.

Phil Harvey

This request is more difficult to implement than you might imagine.

Let me think about this.

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

Mac2

I understand.

Then maybe just a fixed/published list of exceptions, where ExifTool can read but not write (like PDF)?

My application maintains a schema with information about each file format supported. Which plug-in to use, description, list of extensions and other specifics. Currently I'm trying to enhance this info with data about whether ExifTool supports the format, if IPTC/EXIF data can be read/written, if XMP data can be embedded or has to be stored in a sidecar file etc.

I'm compiling this information from the ExifTool documentation, the -list* output and research. A built-in function in ExifTool like proposed in my above reply would of course be very welcome. But I can live with a static table somewhere in the documentation - because this info is likely to change only when new formats are added to ExifTool and then I can look up the info myself in the documentation.

Phil Harvey

Well, there are only 67 writable formats, so it shouldn't take more than a few hours to generate this list.  The problem is to find the time...

Doing this for all 242 readable formats would be more work.  Probably worth doing too, but this would be a weekend project.

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

Mac2

Hi, Phil

thanks for even considering this. It's not that urgent and I'm so far happy with what I've got. It's only the occasional surprise like this PDF write-back issue that cause small troubles and questions.

Phil Harvey

Well, I finally got around to doing this, and spent most of last weekend adding the metadata types to the Supported File Types table on the ExifTool home page.

It was a lot of work, and there are still some grey areas (ie. the metadata supported sometimes depends on the version number of the file), but I think the list is fairly complete.

Please let me know if you find any errors or omissions.

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

Mac2

Thank you, Phil.
I'll read it with care. Quite an impressive list.
( You should definitely consider taking on some apprentice, for that kind of work  ;) )

MOL

Hi Phil

Thanks a lot for that list.  Worth its length in gold... :)

-Uwe