Yes, this is another PDF article, but this time it involves a bit of privacy or security because there’s such a thing as PDF Exif data. This shouldn’t take all that long and it shouldn’t be all that complicated.
Files have Exif data. Well, many files do. You’ll find Exif data in your image files, document files, and even PDF files.
Exif data is metadata. It can contain information about when the file was created, how it was created, and when it was modified, among other things. This is useful data but you may still want to know it exists. Additionally, you may want to change it.
I’ve covered Exif data in the past. Exif stands for Exchangeable image file format and is used in many different ways.
Here are some other Exif articles:
How To: Sanitize Exif Data From Your Digital Images For Privacy Sake
Short: Show File Creation, Modification, and Access Times
Review: MetaClean (Clean Exif/meta Data From Email Attachments Automatically)
So, this isn’t a foreign concept. There are other Exif data articles, but this one is specifically for PDF files. We will need some software for this and that software is ‘ExifTool’…
ExifTool:
The tool we’ll be using in this article is known as ‘ExifTool’ and it’s a widely available application. The ExifTool application is used to view the metadata from a wide variety of file types.
If you check the man page, it should describe ExifTool as such:
exiftool – Read and write meta information in files
You should check the man page once you have ExifTool installed. You do that with the following command:
1 | man exiftool |
The list of things ExifTool works with is why you should check the man page. It’s rather extensive and it may surprise you how much metadata is kept in a file. It’s a lot and this is the correct tool for the job.
Let’s see if I can fit the man page into this article to show you how many file types contain meta information that you may not be aware of…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ 360 r/w | DR4 r/w/c | JNG r/w | O r | RAW r/w 3FR r | DSS r | JP2 r/w | ODP r | RIFF r 3G2 r/w | DV r | JPEG r/w | ODS r | RSRC r 3GP r/w | DVB r/w | JSON r | ODT r | RTF r A r | DVR-MS r | JXL r | OFR r | RW2 r/w AA r | DYLIB r | K25 r | OGG r | RWL r/w AAE r | EIP r | KDC r | OGV r | RWZ r AAX r/w | EPS r/w | KEY r | ONP r | RM r ACR r | EPUB r | LA r | OPUS r | SEQ r AFM r | ERF r/w | LFP r | ORF r/w | SKETCH r AI r/w | EXE r | LIF r | ORI r/w | SO r AIFF r | EXIF r/w/c | LNK r | OTF r | SR2 r/w APE r | EXR r | LRV r/w | PAC r | SRF r ARQ r/w | EXV r/w/c | M2TS r | PAGES r | SRW r/w ARW r/w | F4A/V r/w | M4A/V r/w | PBM r/w | SVG r ASF r | FFF r/w | MACOS r | PCD r | SWF r AVI r | FITS r | MAX r | PCX r | THM r/w AVIF r/w | FLA r | MEF r/w | PDB r | TIFF r/w AZW r | FLAC r | MIE r/w/ | PDF r/w | TORRENT r BMP r | FLIF r/w | MIFF r c | PEF r/w | TTC r BPG r | FLV r | MKA r | PFA r | TTF r BTF r | FPF r | MKS r | PFB r | TXT r CHM r | FPX r | MKV r | PFM r | VCF r COS r | GIF r/w | MNG r/w | PGF r | VRD r/w/c CR2 r/w | GPR r/w | MOBI r | PGM r/w | VSD r CR3 r/w | GZ r | MODD r | PLIST r | WAV r CRM r/w | HDP r/w | MOI r | PICT r | WDP r/w CRW r/w | HDR r | MOS r/w | PMP r | WEBP r CS1 r/w | HEIC r/w | MOV r/w | PNG r/w | WEBM r CSV r | HEIF r/w | MP3 r | PPM r/w | WMA r CZI r | HTML r | MP4 r/w | PPT r | WMV r DCM r | ICC r/w/c | MPC r | PPTX r | WTV r DCP r/w | ICS r | MPG r | PS r/w | WV r DCR r | IDML r | MPO r/w | PSB r/w | X3F r/w DFONT r | IIQ r/w | MQV r/w | PSD r/w | XCF r DIVX r | IND r/w | MRC r | PSP r | XLS r DJVU r | INSP r/w | MRW r/w | QTIF r/w | XLSX r DLL r | INSV r | MXF r | R3D r | XMP r/w/c DNG r/w | INX r | NEF r/w | RA r | ZIP r DOC r | ISO r | NKSC r/w | RAF r/w | DOCX r | ITC r | NRW r/w | RAM r | DPX r | J2C r | NUMBERS r | RAR r | |
These are the types of metadata that ExifTool can interact with:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Meta Information ----------------------+----------------------+--------------------- EXIF r/w/c | CIFF r/w | Ricoh RMETA r GPS r/w/c | AFCP r/w | Picture Info r IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r XMP r/w/c | FotoStation r/w | MPF r MakerNotes r/w/c | PhotoMechanic r/w | Stim r Photoshop IRB r/w/c | JPEG 2000 r | DPX r ICC Profile r/w/c | DICOM r | APE r MIE r/w/c | Flash r | Vorbis r JFIF r/w/c | FlashPix r | SPIFF r Ducky APP12 r/w/c | QuickTime r | DjVu r PDF r/w/c | Matroska r | M2TS r PNG r/w/c | MXF r | PE/COFF r Canon VRD r/w/c | PrintIM r | AVCHD r Nikon Capture r/w/c | FLAC r | ZIP r GeoTIFF r/w/c | ID3 r | (and more) |
That’s not as well-formatted as I’d like, but it will have to do. It’s a lot of information and I’m not going to invest more effort than I have already invested in this. It’s just a code block, which should work well enough.
So, ExifTool is quite extensive and we only need it for PDF Exif Data!
Seriously, this is quite a tool. It’s something you may want to be familiar with.
PDF Exif Data:
This ExifTool is a terminal-based application. That means you’re going to need an open terminal and a PDF file to work with. You can start by pressing
You’ll need to install ExifTool. The command will vary based on your distribution’s package manager. It should be available for the major distros and I’ll cover some of those installation instructions.
Debian/Ubuntu/etc:
1 | sudo apt install libimage-exiftool-perl |
RHEL/CentOS/etc:
1 | sudo dnf install perl-Image-ExifTool |
Arch/Manjaro/etc:
1 | sudo pacman -S perl-image-exiftool |
You can also use your GUI package installation tools to install ExifTool. If the above commands don’t work for you, be sure to leave a comment.
You can download a test PDF: stacer.pdf (which may indicate a future article.)
If you’ve downloaded that file, you need to navigate to the correct directory. Unless you changed something, you likely default to the ~/Downloads directory. You can navigate to that directory with cd ~/Downloads and then use the ls command to ensure the stacer.pdf file exists.
So, the syntax to get started is just this:
1 | exiftool <file_name>.pdf |
In our example, it’d look like this:
1 | exiftool stacer.pdf |
You’ll get an output similar to this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $ exiftool stacer.pdf ExifTool Version Number : 12.40 File Name : stacer.pdf Directory : . File Size : 40 KiB File Modification Date/Time : 2024:04:05 21:06:34-04:00 File Access Date/Time : 2024:04:07 18:08:32-04:00 File Inode Change Date/Time : 2024:04:05 21:06:34-04:00 File Permissions : -rw-rw-r-- File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No Title : stacer Create Date : 2024:04:06 01:06:34 Modify Date : 2024:04:06 01:06:34 Producer : https://imagemagick.org Page Count : 1 |
There’s quite a bit of information available and that file doesn’t even have all the information that can be found in your PDF’s metadata.
This PDF isn’t a good one, but you can at least change the title. You can blank the title with this command:
1 | exiftool -Title="New Title" stacer.pdf |
You can blank the title with this command:
1 | exiftool -Title stacer.pdf |
Other PDF documents will contain other fields. You can wipe all the fields, resetting the creation and modification times, with this command:
1 | exiftool -all <file_name>.pdf |
If you’re interested in changing that for privacy reasons, that’s a nice and simple command that will reset all of that metadata. It’s a pretty handy command and ExifTool is a pretty handy tool.
Closure:
So, there’s some ExifTool information and some information about PDF Exif data. That seems like a reasonable article. A new Linux user may be interested in PDF Exif data and this should make it simple enough for anyone to follow along with. You should read the man page because this is an expansive application.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.