PDF to PDF/A Converter
Operator: Abdulla Al Fahad. How tools are built and checked
Archives and procurement portals ask for PDF/A because it forbids what makes a PDF depend on the machine that opens it: fonts that are not inside the file, scripts, encryption, device-dependent colour. A PDF that a portal rejected usually breaks only a few of those rules, and some of them are mechanical to fix.
This page fixes the mechanical ones, refuses the ones that would mean changing the document, and lists every change and every refusal. It does not call its output conformant: no PDF/A validator runs in the browser, so the result is a candidate that passed this page's own checks.
Key features
- Targets PDF/A-2b by default, PDF/A-3b when attachments must stay, and PDF/A-1b for portals that still ask for it
- Adds an sRGB output intent with an embedded 410-byte ICC profile, and writes XMP metadata whose title, author, producer, keywords and dates match the Info dictionary
- Removes JavaScript, launch, sound, movie, form-reset and similar actions, additional-actions entries, transfer functions, and annotations of forbidden types
- Refuses with a list when a font that draws visible text is not embedded, when CMYK colour meets an RGB intent, when A-1b meets transparency, or when a form field has no appearance; a font used only for invisible OCR text is allowed and noted
What the conversion changes, what it refuses and what it cannot check
PDF/A is a family of restrictions on PDF, in parts numbered 1 to 4 and levels such as b for basic visual reproducibility. Part 1 is based on PDF 1.4 and bans transparency; part 2 is based on PDF 1.7 and allows transparency, JPEG 2000 and layers; part 2 also allows an attachment, but only when that attachment is itself a PDF/A-1 or PDF/A-2 file; part 3 adds the freedom to embed any file. The checks here cover the rules that can be tested from the PDF's object structure and leave anything that needs inspecting font programs or every content-stream operator to a validator.
How it works
The file is opened with its object structure intact, and every object is scanned once for LZW and Crypt filters, external stream references, transfer functions, blend modes, soft masks, JPEG 2000 images and actions. Fonts are found by walking page resources, form XObjects, patterns and annotation appearances, because a font that is never reached does not matter and one reached only inside a stamp does. The page content streams are then read for the text state, so a font that only ever shows text in rendering mode 3 (invisible, as in the OCR layer of a scan) is not required to be embedded, as ISO 19005 allows; the converter lists such fonts as a note and leaves them as they are.
After the fixes, the document is saved without object streams or cross-reference streams, which keeps it readable by PDF/A-1 tools too. The saved bytes are then opened again and the checks run on them, not on the in-memory document, so a failure in saving shows up as a failed check rather than a quiet pass.
Common use cases
- A records office receives 40 PDFs from a vendor. The 31 scans with an OCR layer convert, because that layer is invisible text and PDF/A does not require its font to be embedded. The nine born-digital reports that set visible text in an unembedded Arial are refused, and the refusal names the font the vendor has to embed.
- A law firm has court filings with fillable forms. The converter flags two forms whose fields have no appearance streams, so they are flattened first and then converted.
- A designer exports a brochure with drop shadows. PDF/A-1b is refused because of transparency, and the same file converts under 2b.
How to use this tool
- Choose the PDF; a password-protected one is refused, so remove its password with Unlock PDF first.
- Pick the target: 2b unless a portal says otherwise, 3b if attachments must stay, 1b for a strict portal.
- Tick Remove attachments if the target does not allow them and you accept losing them.
- Press Check and convert.
- Read the blockers, if any. Each one names what is wrong and what to change in the source application.
- Read the change list and the checks, then download the candidate and validate it with veraPDF if the archive requires proof.
Example
A one-page invoice PDF with an embedded TrueType font, a JavaScript link, a launch link, a JavaScript open action and a custom Info entry
Target PDF/A-2bChanges and checks
Nine changes: one JavaScript action removed, one launch action removed, the open action removed, annotation flags corrected in two places, an sRGB output intent added, the custom Info entry MyCustomKey removed, XMP added with pdfaid:part 2 and conformance B, a file ID added, and the file rewritten without object streams. All 15 output checks pass, and the file is offered for download as a candidate.Edge cases to watch
The output is a candidate. Rules that need the font programs, every content-stream operator or the full colour handling are not checked, and a validator can still object.
XMP metadata is rebuilt from the Info dictionary. Custom XMP properties and custom Info entries are removed, because PDF/A needs an extension schema to describe them.
Removing JavaScript or actions changes behaviour: a form that calculated a total on open will no longer do so.
PDF/A-1b is based on PDF 1.4, and this page does not check every PDF 1.4 limit, so a 1b candidate is the least certain of the three targets.
- Start with 2b. Choose 1b only if the receiving system says so, because 1b rejects every file with a shadow, a semi-transparent image or a layer.
- A refusal for CMYK colour usually means the source was exported for print. Re-export the document with an RGB profile for archiving rather than from the print version.
Common errors and how to fix them
- "1 font is not embedded: Helvetica."
- The PDF draws visible text in a font that is not stored in it. Re-export the document with fonts embedded (most print-to-PDF dialogs have an Embed all fonts option); the page does not substitute fonts.
- "The file draws in CMYK, but its PDF/A output intent is RGB."
- Convert the CMYK content to RGB in the source application. A CMYK intent is not offered here, and DeviceCMYK without one is not allowed.
Best practices
- Archive the original beside the PDF/A candidate: the conversion removes scripts, custom metadata and annotations of forbidden types, and the original is the only record of them.
What each check on the output means
Header and trailer: the first line is %PDF-1.n, a comment of four bytes above 127 follows, the file ends at %%EOF, and the trailer has an /ID. Structure: no object streams, no encryption. Metadata: an unfiltered XMP stream with pdfaid:part and conformance B, well-formed, and in agreement with the Info dictionary.
Content: a GTS_PDFA1 output intent with an embedded profile, no forbidden actions, no LZW, Crypt or external streams, no transfer functions, every font that draws visible text embedded, every annotation printing and of an allowed type, every form widget with an appearance. For PDF/A-1b the transparency check is added.
Why a font is never replaced for you
A substituted font changes the document's text layout, and PDF/A exists to guarantee that the page looks the same decades later. Swapping Helvetica for another sans serif would produce a file that is technically embeddable but is no longer the page the author signed off, so the page refuses and names the font instead.
Frequently asked questions
Can I rely on the result for legal archiving?
Not without validating it. The page runs its own list of checks and says so. veraPDF, a free validator, is the usual reference for archives; run it on the downloaded candidate.
Which target should I pick for a scanned PDF?
PDF/A-2b in nearly every case. A scan's OCR layer is normally invisible text, and PDF/A does not require fonts used only for invisible text to be embedded, so it is not a blocker here. If the OCR software drew the text visibly, in a font it did not embed, the file is refused and has to be re-exported.
What happens to attachments?
PDF/A-1b forbids attachments. PDF/A-2b allows only attachments that are themselves PDF/A-1 or PDF/A-2 files; this page cannot validate an attached file, so for 1b and 2b it blocks every attachment unless you tick Remove attachments. PDF/A-3b keeps them and adds a relationship entry (Unspecified) and a MIME type where they are missing; it does not examine what the attached files contain.
Does the output contain the ICC profile of my document's colours?
No. It carries a generic sRGB profile as the output intent, which is what PDF/A needs for device RGB. The page does not convert any colours.