Too*_*rot 16 pdf file-metadata
我必须发出哪些不可逆命令才能从中删除所有元数据foo.pdf?假设嵌入的图像已经干净。
我的印象来自
https://gist.github.com/hubgit/6078384
那
exiftool -all:all= foo.pdf
qpdf --linearize foo.pdf bar.pdf
Run Code Online (Sandbox Code Playgroud)
可能就足够了,但我不清楚这是否是一个完全完整的方法。有一些谈论pdftk和我不明白的“信息词典”。
GMa*_*ter 13
有一种名为MAT(元数据匿名工具包)的工具可以从多种不同格式中删除元数据。在 Ubuntu 中,我是这样使用它的:
sudo apt install mat2
mat2 filename.pdf # you will now end up with a file called filename.cleaned.pdf
mat2 --inplace filename.pdf # this will overwrite original file with the new one, effectively removing the original file
mat2 --show filename.pdf # this will show the metadata that will be removed, if any (similar to dry run)
Run Code Online (Sandbox Code Playgroud)
请注意,与原始文件相比,清理后的文件将具有更小或更大的文件大小。
如果使用上述命令清理后的图像生成了很大的文件(如 pdf 文件),您可以尝试一种轻量级模式(只需添加)。--lightweight但这可能会留下一些元数据。使用该exiftool命令查明已清理的图像是否仍然泄漏任何元数据。