BASALT · JOURNAL
What PDF version is my file, and does 1.4 versus 1.7 matter?
To check a PDF's version on a Mac, open the file in Preview, choose Tools > Show Inspector and read the PDF version line in the General Info pane. In Terminal, head -c 8 document.pdf prints the header, the file's first eight bytes, for example %PDF-1.7. The header isn't always the last word: a /Version entry inside the file can raise it, and Spotlight reports the raised number.
Whether the number matters is a different question. It tells you which features the file is allowed to use, not which ones it uses, and it says nothing about whether the file is safe, clean or well made. A PDF 1.4 file and a PDF 1.7 file can look identical on the screen.
Where the version is written
The version lives in two places. The first is the header, the first line of the file, %PDF-1.4 through %PDF-1.7, or %PDF-2.0 for the newest standard. The second is an optional /Version entry in the document catalog, the root object. When the catalog names a later version than the header, the catalog wins. If it names an earlier one, it's ignored. The entry exists so a program can raise the version of a file by appending a small update, without rewriting the first line.
So a header on its own can understate the file. A tool that reads only the first line reports 1.4 for a file whose catalog says 2.0, and on macOS 15 one of the commands below did exactly that.
What each version added
Each version was a release of the format with new capabilities. The main ones:
- 1.4: transparency, so a page can have see-through objects.
- 1.5: object streams and cross-reference streams, which compress the file's internal structure, and optional content, the layers that can be switched on and off.
- 1.6: AES encryption.
- 1.7: the version that became the international standard ISO 32000-1 in 2008.
- 2.0: ISO 32000-2, published in 2017 and revised in 2020. It deprecates the information dictionary except for the two dates, and it deprecates XFA forms.
None of that is a quality ranking. If a very old or specialized program refuses a file, the version is a reasonable thing to suspect, but a refusal can equally come from encryption, a damaged structure or an unsupported form.
Does 1.4 versus 1.7 matter?
For reading, rarely. For a few jobs, yes.
Archiving and print workflows sometimes name a version in their requirements. PDF/A, the archiving standard, is built on specific versions: PDF/A-1 on PDF 1.4, PDF/A-2 and PDF/A-3 on PDF 1.7, and PDF/A-4 on PDF 2.0 (the PDF Association's ISO 19005 page lists the parts). If a requirement says "PDF 1.4", export with the matching setting in your source application, then check the result with the commands below. Archiving a PDF for the long term goes into that side.
For checking a file's contents, the version matters in one practical way. From 1.5 on, the information dictionary, annotations and other objects can be stored inside compressed object streams. A plain grep on such a file may find nothing even though the data is there. That's why a raw search for an author's name can miss it, and why this post's commands read the structure with qpdf.
A newer version number can also mean more can be hidden. Layers arrived in 1.5, so a file that really follows 1.4 has no optional content groups, which is useful to know when you read what PDF layers can hide. Readers don't police the number, though, so check rather than assume. And a 1.7 file may have no layers at all.
How to check on a Mac
The quick check is Preview's Inspector. Open the file, choose Tools > Show Inspector and look at General Info, which lists File name, Document type, File size, Page size, Page count, Title, Subject, Author, Content creator, PDF Producer, PDF version, Creation date and Modification date. When the exact number matters, use the commands below, which read the header and the effective version separately.
To read the header yourself:
head -c 8 document.pdf
It prints the header, such as %PDF-1.7. A file that doesn't start with %PDF- isn't a standard PDF.
To see the version after any catalog override, ask Spotlight with a test import, which stores nothing in the index:
mdimport -t -d2 document.pdf
Look for kMDItemVersion. On macOS 15 it reported the later of the header and the catalog entry. A test file with a %PDF-1.4 header and /Version /2.0 in its catalog showed kMDItemVersion = "2.0", and one with a 1.7 header and /Version /1.4 showed 1.7. PDFKit, the PDF framework built into macOS, gave the same answers. mdls -name kMDItemVersion document.pdf shows the same field for files that Spotlight has indexed, and prints (null) for files it hasn't.
For the exact structure, install qpdf with brew install qpdf. It only reads here:
qpdf --check document.pdf
The second line says "PDF Version:" followed by the header's number. In the same test file, that line showed 1.4 while the catalog said 2.0, so don't use it alone. To see the catalog entry, find the root object number in the trailer with qpdf --show-object=trailer document.pdf, then print it with --show-object= followed by that number. Look for /Version.
Because the version is only a ceiling, to see what a file actually carries, check its layers, encryption and objects directly. How to see everything a PDF is carrying shows how.
Changing the version
You don't edit the number directly. The version comes from the software that writes the file, so change it by exporting again with a different setting. Some export dialogs offer a compatibility choice, with wording that differs by app. Lowering the version can force the app to flatten transparency or leave out layers, so look at the result. Password protecting a PDF on a Mac also matters here, since AES encryption arrived in 1.6.
Frequently asked questions
How do I check the PDF version on a Mac?
Open the PDF in Preview, choose Tools > Show Inspector, and read PDF version under General Info. In Terminal, run head -c 8 document.pdf to print the header. If the file's catalog has a later /Version entry, that entry takes precedence, and kMDItemVersion in the output of mdimport -t -d2 shows the result.
What version is my PDF?
It's the number after %PDF- at the top of the file, unless the catalog's /Version entry names a later one. Common values are 1.3 to 1.7, and 2.0 for files written to the newest standard. On macOS 15, a file written by the system's own PDF writer had a %PDF-1.3 header.
What does PDF version 1.7 mean?
It means the file follows the PDF 1.7 specification, which became the international standard ISO 32000-1 in 2008. It allows everything added in 1.4 to 1.6, including transparency, object streams, layers and AES encryption. It doesn't say the file uses any of them.
What's the difference between PDF 1.4 and 1.7?
Version 1.4 allows transparency but not object streams, layers or AES encryption, which arrived in 1.5 and 1.6. Version 1.7 allows all of these and is the standard ISO 32000-1. For ordinary reading on a Mac the two display the same, but 1.7 files are more likely to store structure in compressed form.
What is PDF version 2.0?
It's ISO 32000-2, published in 2017 and revised in 2020. It deprecates the information dictionary except for the creation and modification dates, and deprecates XFA forms. A PDF 2.0 file normally has %PDF-2.0 in its header.
Does a higher PDF version mean a better file?
No. The version records which features a file may use, not how well it was made, how large it is or how its pages look. If a recipient names a version, export to that one. Otherwise the number your app picks is fine.
Is an older PDF version safer?
Not on that basis. The version number doesn't tell you whether a file has scripts, links or other active content. Check what the file actually contains, and treat an unexpected file as untrusted whatever its version.
Doing it in Basalt
For reading a version number, Preview, head -c 8 and mdimport are the right tools, and Basalt isn't one of them. Basalt helps with the question the number can't answer: what the file carries. Its Inspect tool reports saved generations, which document properties are filled, whether XMP is embedded, and the count of embedded files, JavaScript, optional layers, annotations and unreferenced objects, each with a severity and a plain-English remedy.
Inspect works on any PDF and never quotes what it finds. It can also run across many files at once and save the report as plain text. The engine that opens documents has no network entitlement, and every tool writes a new file. You can try every tool free for 24 hours, then it's $29 once for up to three Macs.
Redaction that proves itself
Basalt destroys the content you mark, then re-opens the file it wrote and proves the content is gone before it saves anything. Your documents never leave your Mac.