ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: sevy on February 11, 2022, 01:01:30 PM

Title: PDF - xmp:subject pdf:keywords and accentued characters
Post by: sevy on February 11, 2022, 01:01:30 PM
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

Title: Re: PDF - xmp:subject pdf:keywords and accentued characters
Post by: Phil Harvey on February 14, 2022, 03:12:13 PM
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
Title: Re: PDF - xmp:subject pdf:keywords and accentued characters
Post by: sevy on February 15, 2022, 02:44:44 AM
Thank you !