Hi, i checked metadata of below sample PDF using exiftool command
"exiftool(-k).exe" -g1 -a -u -s "test-indesign-003-dl.02.pdf"
And found two PDFVersion tag in metadata.
Since there are two PDFVersion tag it causes issue in metadata writeback. Why we have such duplicate data?
The PDFVersion tags are in two separate locations. Once in the PDF group (https://exiftool.org/TagNames/PDF.html) and one in the XMP-pdf (https://exiftool.org/TagNames/XMP.html#pdf) group.
C:\>exiftool -G1 -a -s -PDFVersion C:\Users\Bryan\Actual_Documents\!Incoming_Downloads\Documents\test-indesign-003-dl.02.pdf
[PDF] PDFVersion : 1.4
[XMP-pdf] PDFVersion : 2024.06
Why? Some program didn't correctly reconcile the different data when it was written. Or maybe it was only writing to the XMP-pdf, as I recall reading somewhere that Adobe is pushing the XMP standard over the original PDF tags, as it's much more flexible.
Thank you for your inputs.
I also observed these both are under different root, but is it possible to writeback [XMP-pdf] PDFVersion value with same of [PDF] PDFVersion value? So that both values are same and it won't cause problem for client.
If such scenario is possible please share your inputs on it.
You could use this command to copy the tag
exiftool "-XMP-pdf:PDFVersion<PDF:PDFVersion" /path/to/files/
This command creates backup files. Add -Overwrite_Original (https://exiftool.org/exiftool_pod.html#overwrite_original) to suppress the creation of backup files. Add -r (https://exiftool.org/exiftool_pod.html#r-.--recurse) to recurse into subdirectories. If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation. (The last bit isn't required for this specific command, but any changes might require it).
But you do need to understand how exiftool updates PDFs. Exiftool uses the incremental update function of PDFs to update the files (see "Incremental Updates in PDF files", Debenu Foxit (https://www.debenu.com/kb/incremental-updates/)). This does not remove any previous data and such changes are reversible. In order to make the changes permanent, the file needs to be re-liniarized by a program such as Adobe Acrobat (see here (https://community.adobe.com/t5/acrobat-sdk-discussions/linearizing-a-pdf/td-p/8366236)) or qpdf (https://github.com/qpdf/qpdf) (run qpdf --linearize --replace-input file.pdf).
The reason I mention this is that if the client is having problems with a simple discrepancy between two tags, they might also have problems with an incremental update PDF.