Hi HN. I'm building FynePDF, a PDF app for web and desktop. We used Ghostscript for PDF/A conversion on our servers, and when we started checking its output with veraPDF, some files carried the PDF/A label but failed validation. Its AGPL also kept it out of our desktop app. So we wrote our own converter and open-sourced it. The main difference is the approach. Ghostscript's pdfwrite interprets the PDF and writes a new one from what it draws, so anything the writer doesn't carry over is lost: bookmarks, links, form fields, tags, sometimes the text mapping. fynepdf-pdfa opens the file with qpdf and works object by object. What PDF/A allows stays byte for byte. What it forbids is removed or rewritten (JavaScript, LZW, device CMYK under an sRGB intent, invalid layer configs). What it requires is added (output intent, XMP, field appearances). Nothing is rendered, except PDF/A-1 pages with transparency, which go through PDFium with the text kept invisible on top so it stays searchable. Fonts are most of the work. It parses TrueType, CFF, Type 1 and CID programs, matches every code the pages show to a glyph, writes widths and cmaps where they disagree, and replaces unembedded fonts with metric-compatible free ones (Arimo for Arial, Tinos for Times, Carlito for Calibri, plus CJK) so no line moves. One rule: the pdfaid label is written last, and only if every pass came out clean. Otherwise you get the file without the label and the reason, e.g. "font-not-embedded: KozMinPr6N-Regular". How we measured: 2,053 files (the veraPDF corpus, the first 1,000 PDFs of the SafeDocs web crawl, and small files built to break one rule each), converted to PDF/A-2b and checked with veraPDF 1.31: valid PDF/A false labels total time peak memory fynepdf-pdfa 99.3% 0 96 s 215 MB Ghostscript 10.08 93.5% 100 740 s 1.4 GB LibreOffice 25.2 96.0% 62 4,113 s 5.6 GB OCRmyPDF 17.13 84.6% 192 1,806 s 5.2 GB We also checked that text survives (pdf.js), that pages look the same (Poppler diff), and that bookmarks, links, fields and tags are kept. We wrote the benchmark, so be skeptical: the scripts and the shareable files are in the repo to rerun it. What it doesn't do: PDF/A-1b, 2b and 3b only, so no "a" or "u" levels and no PDF/A-4, and no OCR. 15 of the 2,053 files don't make it: an unembedded Japanese font with no Unicode mapping, Chinese characters missing from the fallback font, password-protected files, a truncated download, HTML pages saved as .pdf, and corpus files that test PDF's own limits. To try it: npx fynepdf-pdfa in.pdf out.pdf (Linux x64/arm64, Windows x64, macOS). It's also a C++17 library with CMake support. We've run it in production since late October. Same approach for grayscale conversion, if that's useful to anyone: https://github.com/fynepdf/fynepdf-grayscale Happy to answer any questions about PDF/A edge cases. Fonts are where it gets weird.
Repository
fynepdf/fynepdf-pdfa
fynepdf-pdfa
fynepdf/fynepdf-pdfa
fynepdf-pdfa
A C++17 library and CLI tool that converts PDFs to valid PDF/A by fixing them in place, without Ghostscript. Achieves 99.3% valid PDF/A-2b on test files.
Visit project- First shared
- Nov 10, 2026
- HN activity
- 11
Show HN@biazNov 10, 2026
Show HN: Fynepdf-pdfa – PDF/A conversion without Ghostscript (MIT)
Community