Repository navigation
gopdfrab 1.2.0 makes conversion more honest and the CLI easier to read. No
public Go symbol changed. Convert now rasterizes fewer pages, reports what it
could not draw, and produces fewer files that other validators reject. The
CLI's text output is grouped and has a fixed, parseable layout.
Highlights
- No more silent gray boxes: a JPEG 2000 or JBIG2 image, or a CCITT image
that fails to decode, was painted as a gray placeholder on a rasterized page
and reported nowhere. It is now listed inRasterDrops, and fixers no longer
write the gray into the file in place of the picture. - The CLI reports rasterization:
convertprintsrasterized:and
dropped:lines (rasterizedPagesandrasterDropsin--json). Before,
a page rebuilt as an image with content missing printed only
result: conformant. - Grouped, parseable CLI output: one line per check and message, with a
count, page ranges and the number of objects, and the profile named once in
a header.--detaillists every location. The layout is documented in the
README. - Fewer rasterized pages: graphics state nested past the 28-level limit,
tiling patterns in an uncovered device colour space, array-form LZW filters
on inline images and CID fonts that draw an unmapped glyphless CID are now
repaired in place. - More accurate font checks (6.3.5/6.3.6): fonts are tracked across
q/Q
and into form XObjects, simple TrueType codes resolve through/Encodingand
the cmaps as ISO 32000-1 specifies, and Type 1 subsets are checked against
their built-in encoding and hexadecimal/CharSet. This removes false
reports and catches missed ones. - Output other validators accept: converted files that veraPDF or BFO
rejected because of CFF and Type 1 width encodings, a missing glyph for code
160, truncated empty TrueType glyphs or wrong sfnt checksums now pass.
Behaviour changes
- CLI text output:
verifyandconvertprint a new, grouped layout.
Scripts that parse the old per-issue lines need updating, or can switch to
--json, which keeps its existing fields and gainsrasterizedPagesand
rasterDrops. - Unsupported levels are an error: a profile whose level is not
A1Bor
ObjectModel, such asNewProfile("A-2b")or a zero-valueProfile, ran
no checks and verified asValid. Verify and Convert now return an error
for it. PDFError.Stringprints an object asref 4 0 Rinstead of
ref &{4 0}.- Crafted encryption dictionaries with an inconsistent
/Vand/R
returnErrEncryptedinstead ofErrInternal.
The last three make results more correct, which the stability policy treats
as fixes.
Install
go get github.com/voidrab/gopdfrab@v1.2.0
go install github.com/voidrab/gopdfrab/cmd/gopdfrab@v1.2.0
Or download a CLI binary below. They are static, built with CGO_ENABLED=0;
verify with sha256sum -c checksums.txt.
The full list of additions, changes and fixes is in
CHANGELOG.md.