Repository navigation
v1.1.0
gopdfrab 1.1.0 is a hardening release: no breaking changes, a handful of
additions, and fixes for crashes, wrong verdicts and lost content that hostile
or damaged input could cause.
Highlights
- Panics become errors: a panic inside gopdfrab, including one in an internal
worker goroutine, is recovered at the public entry points and returned wrapping
the newErrInternal, instead of crashing the caller's process. - Atomic
Save:ConvertResult.Savewrites a temp file beside the target and
renames it into place, so a failed save no longer truncates an existing file,
including the input when converting in place. - Cancellation that takes effect:
VerifyContextpolls the context during the
object-graph walk, and Convert's raster passes stop dispatching page renders
once it is cancelled. - Hostile-input hardening: a stream
/Lengthpast the end of the file, an
out-of-range xref stream offset, long runs of comment lines and a self-listing
/Kidscan no longer crash the process or exhaust memory. - Encryption: revision 5 (AES-256, Adobe Extension Level 3) now
authenticates; it used to reject every password, including the correct one. - Convert honesty: a stream whose
/Filterused an inline-image abbreviation
(/Fl) could be reported valid while its content was unreadable. Abbreviations
are now expanded, and the decode cache keys on the filter chain. - Damage recovery: a badly wrong stream
/Lengthis recovered from
endstreaminstead of losing the stream, one bad object no longer loses its
whole object stream, and header/xrefrecovery scans are 4–7× faster. - Batch and CLI:
VerifyAllContexthonoursOptions.Workers; the CLI reads
--passwordfrom$GOPDFRAB_PASSWORD, which unlike the flag is not visible
inps.
Behaviour changes
No public symbol changed. Two results are more correct than before, which the
stability policy treats as fixes:
- 6.1.7/6.1.8 framing issues are document-level now, with the object in
ObjectRef(). They used to report the object number asPage(). - 6.1.12
IndirectObjectsExceededfires on more than 8,388,607 indirect objects.
It used to fire on an empty cross-reference table.
Install
go get github.com/voidrab/gopdfrab@v1.1.0
go install github.com/voidrab/gopdfrab/cmd/gopdfrab@v1.1.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.