PDF - xmp:subject pdf:keywords and accentued characters

Started by sevy, February 11, 2022, 01:01:30 PM

Previous topic - Next topic

sevy

Hello,

I'm adding keywords/subject with accentuated characters to a collection of PDF as followed :
dos console :
chcp 65001
exiftool -L -xmp:subject="word" -pdf:keywords="word" file.pdf

and it's working fine :-)
But, if I add keywords to a file with existing kewords with :
exiftool -L -xmp:subject+="word2" -pdf:keywords+="word2" file.pdf
it's fine for xmp:subject but for pdf:keywords, the existing keywords are "destroyed" (example : éé is transformed to  éé)
I guess the problem is linked to pdf encoding method (if I well understand https://exiftool.org/faq.html#Q10)
Until now, the only way I found to bypass the problem is to operate in 2 steps :
exiftool.exe -L -xmp:subject+="word2"
then
exiftool "-pdf:keywords<${xmp:subject}"

My question is : is it possible to add subject/keywords in 1 operation and not 2 ?

thank in advance


Phil Harvey

This is a good point.  PDF Keywords aren't currently handled properly when adding to an existing list.  Your 2-step method is the work-around, but I will look into this and see how difficult it would be to improve the situation in a future release.

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