Command-line tool

gopdfrab convert

Rewrite a PDF as a PDF/A-1b conformant document, and find out what could not be fixed.

convert rewrites a single input. It applies pre-emptive fixups, then loops between verifying and repairing until the document converges, and rasterizes a page only as a last resort when no in-place fixer can repair it.

Flags

In addition to the shared flags, convert accepts:

Flag Value Description
--dpiintRaster fallback resolution. 0 uses the default of 150.
--max-iterationsintBound on the verify/fix loop. 0 uses the default of 4.
-opathOutput path. Defaults to the input with a .pdfa.pdf suffix, or .fixed.pdf for the pdf profile. A positional output argument works too.

--dpi only matters when a page has to be rasterized — it is the resolution that fallback renders at, and the trade is file size against legibility.

--max-iterations bounds the repair loop for pathological documents where fixing one problem keeps surfacing another.

Conformant is not the same as unchanged
A page that was blanked during conversion still verifies clean. For archival work, check the output visually or use the library's fidelity comparison, which renders both sides and reports per-page differences.

For the equivalent in Go, with fidelity checking and batch streaming, see conversion in the library docs. To try a conversion without installing anything, use the browser converter.