13

When using exiftool -all:all= file.pdf this message appears:

ExifTool PDF edits are reversible. Deleted tags may be recovered!

Can tag recovery be prevented when ExifTool is used? Can it just wipe/overwrite them without saving previous info?

PDF is an example. I know about MAT2 but I don't want to rebuild and rasterize files, as MAT2 does.

4

2 Answers 2

15

The author of exiftool looked into zeroing out the data in August 2019 and has decided that against it.

  1. It is harder than I had hoped to simply zero out the existing metadata.

  2. The solution wouldn't be complete because there could already be unused objects containing old metadata in the original PDF, and ExifTool wouldn't be able to zero out these.

  3. It has been advertised that ExifTool PDF edits are reversible, and some users may be relying on this feature.

See this thread on the exiftool forums.

The use of qpdf or similar programs to re-linearize after using exiftool is still how exiftool's author suggests to fully remove all metadata.

3
  • 1
    What does linearization do? Commented Sep 14, 2019 at 17:26
  • 1
    Linearizing a pdf reorganizes the data in a pdf so it is faster to read through the web. It basically makes it more steamable, allowing the web browser to show the first page right away before the whole PDF is downloaded. See the last paragraph under the PDF->File Structure wikipedia page, just before "Imaging model".
    – StarGeek
    Commented Sep 14, 2019 at 17:32
  • It seems that it's a reasonably easy and fast method, which doesn't increase the filesize a lot. Commented Sep 17, 2019 at 13:03
4

Following the previous answer, here is what is suggested in the exiftool forum to remove PDF metadata:

#!/usr/bin/env bash
# Strip metadata and re-linearise:
exiftool -all= -overwrite_original "$1"
mv "$1" /tmp/temp.pdf
qpdf --linearize /tmp/temp.pdf "$1"
1
  • 1
    Newer versions of qpdf can avoid the temporary file with the --replace-input option.
    – StarGeek
    Commented Nov 11, 2023 at 22:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .