EXIF can't write metadata on PDF

Started by seraosr, November 28, 2012, 05:29:19 AM

Previous topic - Next topic

seraosr

Hi Phil,
Since my previous doubt how to add a keyword with part of filename, i'm with problems with all my PDF, because EXIF can't write the keywords. This PDFS are from Koday prepress workflow system called 'Prinergy'. All the others PDFs are ok!

Can you please check the attached pdf and see what's wrong!? We think maybe the problem is because PDFs files aren't tagged.

Thank you

Phil Harvey

Why do you say that ExifTool can't write the keywords?

I don't know how you are trying to write them, or how you are trying to read them.

I suspect that this is FAQ number 3.

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

seraosr

#2
Hi Phil,
Previous, on topic (4593: ExifTool Forum » ExifTool » Newbies » Create keyword from the file name, all name till first underscore) you explain me how to construct the (.ExifTool.config).

After, i've tested several PDF's and worked perfectly, however, on the PDF attached (that is the model of the bulk of pdf's we have), exif tool is executed, no errors on processing, but we you open the file no keywords were added.

Please un-zip to "c:\" the file attached and see the folder PDFS, there is 2 PDF files, both was executed from "exif.cmd", one PDF (from the internet) have keywords and other (from our Workflow) haven't.

Maybe this is to strange, and i'm sorry if i'm making you lost your time.

Regards
Rcardo

PH Edit: Added link to referenced topic

Phil Harvey

Hi Ricardo,

Thanks for the details, but...

Quote from: seraosr on November 28, 2012, 08:35:08 AM
we you open the file no keywords were added.

Open with what?  If you read the file with ExifTool, are the keywords there?  If yes, then the problem is FAQ number 3.

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

seraosr

Hi Phil,
open with Adobe Reader, of course! If i open both files with Adobe Reader, one file show me the keyword on the keyword field, other file don't.

My goal is, keyword field on the PDF file be populated with filename.

Thanks and regards

Phil Harvey

OK, so the problem is that you don't know where to write the Keywords so that they are recognized by Adobe Reader.  This is FAQ number 3:

If you are having problems with other software reading information written by ExifTool, if possible try first writing the information from the other software, then use ExifTool (with the -a and -G1 options) to determine where the information was written. Once you know where it should go, you can use ExifTool to write to this location. You can read or write information in a specific location by prefixing the tag name on the command line with the desired group name. ie) "-ExifIFD:DateTimeOriginal"

This problem may also occur if contradictory information exists in different meta information formats within the same file. For example, often XMP will be ignored if IPTC exists and the Photoshop:IPTCDigest does not agree with the IPTC content. The Metadata Working Group recommends techniques to keep the EXIF, IPTC and XMP metadata synchronized. These recommendations are implemented by the ExifTool MWG tags. For maximum compatibility with the widest range of applications, it is suggested that these MWG tags be used whenever possible.


In your case, you are writing PDF:Keywords.  You might try writing XMP:Subject as well since Adobe products tend to prefer XMP.

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

seraosr

Hi Phil,
i've been testing pdf files and i've realized that:

1. After run exif tool keywords on PDF are there, but not showing if open the file with Adobe Reader.
2. After cataloging to my workflow based on Cumulus, on keywords field, the 'Keyword' are there.

So, thats it. Problem's solved. No need to change from "PDF:Keywords" to "XMP:Subject".

Thank you again and again.

Regards
Ricardo

rgschmitt

Phil -
I've been using the exiftool for a long time and have some "how to" on my CarLibrary.org table of contents webpage.  But it's been a while since I've used it.
I want to write metadata into 220 periodicals in pdf format. 
I used the exiftool to create a CSV, then an Excel file to see existing metadata.
Then I added new data for "title", "subject" "date" "copyright" etc. & saved to a CSV.
The command I used is "exiftool -csv=cp-metadata.csv -ext pdf \competitionpress\"
I've tried many variations and usually get "1 directories scanned
    0 image files read"
I just upgraded to the current version.  I can write to a file with the ExifToolGUI, but for 220 files, this is not practical. 
What have I done wrong?
Thanks!!

Phil Harvey

It looks as if there are no files with the extension "pdf" in the "\competitionpress\" directory.

Are you sure there are pdf files there?  Maybe drag and drop the folder on the cmd window instead of typing the directory name to be sure you have the correct folder.

Another possible problem is the use of special characters in the file names which could potentially cause ExifTool to not find the files.

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

rgschmitt

Hi Phil -
Problem solved!
The PDF files were there - in sub-directories by volume, 1-20.
I copied the Vol 1 files into the main "CompetitionPress" directory, adjusted the Source file and the new metadata was written into 10 files (issues). Great!
So I either work within each sub-directory or copy all the files into a single directory, then back again.
However, will the ExifTool write into sub-directories?
I will try adjusting the Source file to each of the sub-directories.
Creating the metadata is the last step to putting all the files into a digital library.  I've used the NZ software Greenstone previously and expect it will work well.
Thanks again!

Phil Harvey

Add the -r option for ExifTool to recurse into subdirectories.

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

rgschmitt

Phil -
Thanks again! 
Is this the correct location of -r?
exiftool -csv=cp-metadata2.csv -r -ext pdf \CompetitionPress\
It didn't seem to work, possibly because of errors in the Source file.
I copied the files into a single directory, ran the ExifTool and all the metadata was written as planned-checked with the ExifToolGUI.
Then copied the files back into their original sub-directories, made a backup, so it's ready for the digital library software.
Bob

StarGeek

The -r (-recurse) option, as with most options, can go just about anywhere in the command.  You just can't place it between an option that needs a second argument and the second argument.  In your example command, you can't place it between -ext and pdf, because then you're looking for an extension of -r.

Personally, I like to put any single letter options near the beginning of the command, followed by any two part options, then the tag assignments, and finally the file names/directories I'm processing.  For me it makes it easier to read.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).