How to Check If a PDF Is Really PDF/A, Free and Offline
To check if a PDF is really PDF/A, open it in veraPDF, a free open-source validator that runs on your own computer, and validate it with the flavour set to Auto-detect. veraPDF reads the PDF/A claim in the file's XMP metadata and tests the file against that part of ISO 19005. The claim alone proves nothing.
This matters because the label is easy to add and conformance is not. The US Library of Congress notes in its PDF/A format description that many PDF documents identifying themselves as PDF/A do not fully meet the standard. For an archive, a regulatory submission or a records system that asks for PDF/A, you want the test result, not the label.
Step 1: read what the file claims
A PDF/A file identifies itself in its XMP metadata, using the PDF/A identification schema. The Library of Congress describes its two mandatory elements: pdfaid:part, an integer, and pdfaid:conformance, a letter. A PDF/A-2b file therefore says part 2, conformance B. PDF/A-4 works a little differently: the veraPDF rule list for ISO 19005-4 requires pdfaid:rev to be 2020, and only PDF/A-4e and PDF/A-4f files give a conformance value (E or F).
You can read the claim without any special software:
- Make a copy of the PDF and open the copy in a plain text editor.
- Search for
pdfaid. If you find it, read the values next topdfaid:partandpdfaid:conformance, which may appear as XML attributes or elements. - If there is no match, the metadata may be compressed. In PDF/A-1 the metadata stream must not be compressed (veraPDF rule 6.7.2-2: metadata stream dictionaries shall not contain the Filter key), but later parts have no such rule. The free qpdf tool can uncompress it: run
qpdf --qdf --object-streams=disable file.pdf check.pdfand searchcheck.pdfinstead.
No pdfaid entry at all means the file does not even claim to be PDF/A.
A note on our own tools. View Metadata in Priya LifePDF shows the document information fields (title, author, creator, producer, dates), the page count and the PDF version from the file. It does not read XMP, so it cannot show a PDF/A claim. Use it to see the other properties, not to answer this question.
Step 2: validate the file with veraPDF
The Library of Congress describes veraPDF as a software tool and open-source library developed to support validation of PDF/A files against all the parts and profiles in ISO 19005. Its documentation says the installer works on any Windows, macOS or Linux machine running Java 8 or later. Once it is installed, validation happens on your computer: you do not send the document anywhere, which matters for unpublished study reports or confidential batch documentation.
Using the desktop app (labels as given in the veraPDF GUI guide):
- Start veraPDF (
verapdf-gui.baton Windows,verapdf-guion macOS or Linux, in the install folder). - Click Choose PDF or drag the file in. A folder or zip file also works.
- Under Choose Profile, leave Auto-detect selected to test the file against the part and level it claims, or pick a specific flavour such as PDF/A-2b if you need to test against a required level.
- Leave Report Type on Validation.
- Press Execute (some versions label it Validate) and wait for the result.
- Use View HTML to read the report, and Save HTML or Save XML to keep it.
One setting needs care. The GUI has a Fix Metadata option that attempts to correct metadata so it matches the specification. Corrected metadata does not fix fonts, colour or anything else, so for a check, leave it off and test the file as it is.
Checking many files from the command line
For a folder of documents, the command-line tool is quicker. From the veraPDF CLI documentation:
verapdf --format text file.pdfvalidates one file with auto-detection and prints a short text report. The text report lists only failed rule numbers unless you add--verbose.verapdf -f 2b file.pdftests against PDF/A-2b whatever the file claims. Other codes include1b,2u,3band4;verapdf -llists them all.verapdf -r --format html folder/ > report.htmlchecks a folder and its subfolders and writes a report you can open in a browser.
Without a format option the report is XML, and it records the result as isCompliant="true" or isCompliant="false" for each file, which is easy to filter in a spreadsheet.
How auto-detection decides what to test
The CLI documentation is precise about this: automatic flavour detection is based on the document conformance specified in the embedded XMP metadata. If that metadata is missing or invalid, veraPDF uses a default, which is PDF/A-1b unless you change it with --defaultflavour or in the GUI settings. So a file with no claim at all is still tested, but against PDF/A-1b. Read the report header to see which profile was used before you draw a conclusion.
Reading the result
- Passed against the claimed profile: the file meets the machine-checkable rules for that part and level. Keep the report with the file if your procedure asks for evidence.
- Failed: the report lists each failed rule, numbered after its ISO 19005 clause (for example 6.7.3-5, the PDF/A-4 rule that pdfaid:rev must be 2020). The label in the file is then wrong, whatever the creating software said.
- Passed, but against the wrong profile: a pass as PDF/A-1b does not show that the file meets a requirement for PDF/A-2b or PDF/A-3a. Test against the level you were asked for.
A validator checks the rules that software can test. It does not review whether the content of the document is correct, complete or approved.
If the file fails
Fix the problem at the source. Export the document again from the authoring application with its PDF/A option switched on, or run it through a dedicated PDF/A converter, then validate the new file. Do not edit the pdfaid entry by hand to match: that changes the claim, not the file.
Be careful with any tool that promises PDF/A conversion, ours included. In its current version, the PDF to PDF/A tool in Priya LifePDF re-saves the file, removing unused objects and compressing streams, but does not add the PDF/A identification or an output intent, so its output should not be treated as PDF/A. Whatever converter you use, veraPDF is the way to check its output.
Which PDF/A part do you need?
Follow the rule of whoever receives the file. For regulatory submissions, the FDA PDF Specifications (v4.1) accept PDF versions 1.4 to 1.7 as well as PDF/A-1 and PDF/A-2. Other agencies have their own lists, so check the current specification for each. According to the Library of Congress, ISO 19005-2:2011 (PDF/A-2) is based on PDF 1.7 and ISO 19005-4:2020 (PDF/A-4) on PDF 2.0, which is one reason a receiver may accept one part and not another. Our guide to preparing PDFs for regulatory submissions covers the other file requirements, and how to check if a PDF tool uploads your files explains how to confirm that a browser tool works locally.
This is general information. Where PDF/A is part of a controlled records or submission process, your QA or regulatory operations team decides which validator, profile and evidence are required.
Tools mentioned in this article
Frequently asked questions
How can I tell if a PDF claims to be PDF/A?
Search the file for pdfaid in a text editor. A PDF/A file declares its part and conformance level in its XMP metadata, for example part 2 and conformance B for PDF/A-2b.
Does a PDF/A label in the metadata mean the file is PDF/A?
No. The label is a claim made by the software that wrote the file. Only testing the file against ISO 19005, for example with veraPDF, shows whether it meets the rules.
Is veraPDF free and does it work offline?
Yes. veraPDF is open-source software that you install on Windows, macOS or Linux with Java 8 or later, and files are checked on your own computer.
What does veraPDF do if a file has no PDF/A claim?
With auto-detection it falls back to a default profile, which is PDF/A-1b unless you change it. Check the profile named in the report before you rely on the result.
Which PDF/A versions are accepted in eCTD submissions?
The FDA PDF Specifications accept PDF/A-1 and PDF/A-2 alongside PDF 1.4 to 1.7. Other agencies publish their own rules, so check the current specification for each submission.
Sources
- veraPDF documentation: getting started
- veraPDF documentation: validation from the command line
- veraPDF documentation: desktop GUI
- Library of Congress: PDF/A Family, PDF for Long-term Preservation (fdd000318)
- veraPDF validation rules for PDF/A-4 (ISO 19005-4), including the pdfaid rules in 6.7.3
- veraPDF validation rules for PDF/A-1 (ISO 19005-1), including rule 6.7.2-2 on metadata streams
- FDA: Portable Document Format (PDF) Specifications, v4.1 (September 2016)
