[Originally posted by ashlin on 2008-08-07 12:31:53-07]First of all, I am newbee to xmp implementation with exiftool so please understand me... I need a help.
I would like to use the `keyword` xmp field of pdf document to write 3 to 4 additionnal informations with exiftool. i'd like to write each information on a new line of this same field. When I do that with exiftool, i have got an error on updating the file. I can only write a one line information.
Now from Acrobat, i've tried the same thing. I've written these separate informations, each on a a different line into the `keyword` field, then saved the document. The metadata seems on a good format to accept the carriage return information. I've looked into the resulting binary pdf file in non-Hex mode and watched to the metadata information, seeking for my `keyword` field representation. It appears like that :
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>application/pdf</dc:format>
<dc:creator>
<rdf:Bag/>
</dc:creator>
<dc:subject>
<rdf:Bag>
<rdf:li>Information 1</rdf:li>
<rdf:li>Information 2</rdf:li>
<rdf:li>Information 3</rdf:li>
<rdf:li>Information 4</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
Can anyone help me to understand how to reproduce a such implementation from a command line use of exiftool or simply how to implement a carriage return information on a field ?
Thanx in advance !
[Originally posted by ashlin on 2008-08-07 15:19:07-07]After several kind of trials, i have noticed differents things. The resulting pdf file with 4 information line into the Keywords field with carriage return included are interpreted like that by acrobat :
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:subject>
<rdf:Bag>
<rdf:li>Information 1</rdf:li>
<rdf:li>Information 2</rdf:li>
<rdf:li>Information 3</rdf:li>
<rdf:li>Information 4</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<pdf:Keywords>Information 1
Information 2
Information 3
Information 4</pdf:Keywords>
</rdf:Description>
So I have tried to pass that command line to exiftool :
-XMP-dc:subject="Information 1" -XMP-dc:subject+="Information 2" (...) -XMP-pdf:Keywords="Information 1
Information 2
Information 3
Information 4"
The result is that all `
` are converted to `
` to appear as text, and so it failed. So the result in the pdf is :
<pdf:Keywords>Information 1
Information 2
Information 3
&#xA;Information 4</pdf:Keywords>
I have manualy replace each `
` by `
` and then it works. So I have now found how to implement carriage return into a field but i still don't know how I can do it from exiftool. Does anyone have an idea on how i can tell to exiftool 'don't shoot `
`' ?
[Originally posted by exiftool on 2008-08-15 11:34:20-07]See
this
thread for details about various techniques to include
newlines in a text value. In this thread I outline 3 possible
methods. In your case, I would suggest method number
2 or 3.
- Phil