Speech marks in metadata fields - Acrobat

Started by Julian, July 26, 2016, 09:49:01 AM

Previous topic - Next topic

Julian

Hi Phil

I am currently using Exiftool to append 4 fields to a large number of PDFs from a spreadsheet. This works, but imperfectly.

What I would like to end up with:

Title:            A
Author:        B
Subject:       C
Keywords:   D

At present, what I am ending up with is:
Title:             A
Author:       "B"
Subject:       C
Keywords:  "D";C

So, superfluous "" around Author and Keyword fields as well as populating Subject in Keyword field too.

Formula being used is:

d:\exiftool -overwrite_original -Title="A" -Author="B" -Subject="C" -Keywords="D" Filename.pdf

When I go into Acrobat to manually remove these fields, when I delete C from the Keyword field and close the metadata box, I end up with it removing C from the Subject field too. When I delete the "" around Author field and close the metadata box, they are there once more when I open it!

When I view the metadata in Adobe Bridge, speech marks appear around the Author field but not Keyword, nor does it show Subject as listed in Keyword field.

I appreciate this may well fall into an Acrobat issue (running Creative Cloud so on latest version) but I don't really understand the mechanics of why it is returning these results.

End result is for a client who will be viewing files in Acrobat.

Your help would be very much appreciated!






StarGeek

Part of the problem is that there are tags with the same name but in different tag groups in PDFs.  Additionally, Adobe products will fill properties with values from multiple tags.  For example, in the case of Subject, there is the XMP-pdf:Subject, XMP-dc:Subject, and PDF:Subject tags.  I'm guessing that what you want to write is PDF:Subject, as that is a string.  XMP-dc:Subject is a keyword type tag and is added to the list of keywords.

Here is a recent thread where we tried to figure out the differences between the tags.  Basically, this boils down to a FAQ 3 exercise.  But I'd guess trying PDF:Subject and PDF:Author to start.
* 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).

Julian

Thanks StarGeek - changing to PDF:Subject resolved subject repeating in keyword field.

Any ideas on how to remove speech marks around author and keyword fields?

StarGeek

Do you have an PDF that doesn't put the quotes around those fields?  If so, use the command in FAQ 3 to see what tag the data is in.  Alternatively, write some data out that field, see what tags it writes to with the same FAQ 3 command. 

It sounds to me that this is just a peculiarity of Bridge.  Adobe isn't consistent between products.  For example, when I run your command on a pdf and open that in Adobe Reader, there are not quotes around any of the metadata fields.
* 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).

Julian

No wonder you weren't getting speech marks in your result - the issue is arising only when I have a comma present, as I do (not previously mentioned - sorry!) in both Author and Keyword fields.

So for example, Authors are: J Smith, M Kelly - this currently returns "J Smith, M Kelly"
And Keywords are KW1, KW2, KW3 which is yielding "KW1, KW2, KW3"

I can of course work around this  - particularly for the keywords  - by using spaces rather than commas. If possible however I would like to display commas in the end result without the associated speech marks. I presume this is from how Adobe treats commas in keywords. Interestingly I don't have an issue if I use ampersand & instead (which would also work for Authors, not keywords).



StarGeek

Quote from: Julian on July 29, 2016, 10:23:54 AM
No wonder you weren't getting speech marks in your result - the issue is arising only when I have a comma present, as I do (not previously mentioned - sorry!) in both Author and Keyword fields.

So for example, Authors are: J Smith, M Kelly - this currently returns "J Smith, M Kelly"
And Keywords are KW1, KW2, KW3 which is yielding "KW1, KW2, KW3"

In the case of keywords, you're creating a single keyword that is equal to KW1, KW2, KW3, not three separate keywords, which would be preferable.  See FAQ 17
* 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).

Hayo Baan

Looks like you are entering multiple keywords/authors as one string. If I recall correctly, Adobe uses the comma as separator so it has to add the quotes around the text to mark it as a single item. Try adding the information as separate entities (e.g., use multiple -keywords=xxx on the exiftool command-line).
Hayo Baan – Photography
Web: www.hayobaan.nl

Julian

I have finally managed to resolve it thanks to this post: https://exiftool.org/forum/index.php?topic=4696.0
Seems to be something peculiar about Acrobat XMP field requirements/expectations - needed to fill Acrobat xmp subject field with keywords (different from the actual subject!).

This manages to assign commas between keywords without the speech marks around the container.

Thanks for the pointers guys!