Two PDF version coming in metadata for PDF

Started by AmanRaj, July 03, 2024, 02:36:27 AM

Previous topic - Next topic

AmanRaj

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?

StarGeek

The PDFVersion tags are in two separate locations.  Once in the PDF group and one in the XMP-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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

AmanRaj

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.

StarGeek

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 to suppress the creation of backup files.  Add -r 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). 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) or 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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype