Reputation: 1792
Is there a way to remove all PDF annotations (including highlights, comments, notes, arrows) in bulk (e.g., via command line)?
Upvotes: 9
Views: 4278
Reputation: 1792
The following series of commands solved my problem:
pdftk in.pdf output - uncompress | sed '/^\/Annots/d' | pdftk - output out.pdf compress
Thanks @Farid Cheragi for the oneliner!
Upvotes: 14
Reputation: 1304
pdfcpu has a subcommand to remove annotations:
pdfcpu annotations remove my.pdf
Upvotes: 4