15

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.

2 Answers2

16

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.

StarGeek
  • 1,644
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"