exiftool
March 31, 2026
To clear all metadata from a PDF file, you can use the exiftool command-line tool. Here's how you can do it:
exiftool -all= -overwrite_original yourfile.pdf
To add metadata to a PDF file, you can use the following command:
exiftool -Title="Your Title" -Author="Your Name" -Subject="Your Subject" -Keywords="keyword1, keyword2" yourfile.pdf