qpdf
qpdf
- project on github: qpdf: qpdf: A content-preserving PDF document transformer
- see also exiftool
install qpdf
brew install qpdfremove metadata from pdf
if in doubt, consider using dangerzone
qpdf --linearize --replace-input foobar.pdfas part of an (zsh) alias:
function qpdfclean() {
emulate -L zsh
local f
for f in "$@"; do
qpdf --linearize --replace-input -- "$f"
done
}