Skip to content

v0.0.16

Pre-release
Pre-release

Choose a tag to compare

@gulien gulien released this 19 Nov 11:20

Important

This is still very much a work in progress, so expect breaking changes.

Features

  • WithStreamCompression compresses the streams a producer left uncompressed. On a full rewrite, every stream without a filter is compressed with FlateDecode when that makes it smaller: content streams, font programs, ICC profiles, embedded files. XMP metadata stays uncompressed (ISO 19005-1, 6.7.2), and images stay with WithImageRecompression. Lossless, deterministic, and like the other compaction options it applies to full rewrites only.

Fixes

  • A remediation rewrites an unsigned document in full (#5). It appended an incremental update, which kept every object it replaced or removed in the file: the original content stream next to the tagged one, and the bytes of what the profile forbids, such as a JavaScript action or an embedded file. A signed document still gets an incremental update, which keeps its signatures; only WithSignatureRemoval lets a rewrite drop them. Thanks @KingSora.
  • litho compresses the streams it writes (#5). The content stream auto-tagging marks, the content streams redaction and stamping rewrite, and the sRGB profile remediation adds were written uncompressed, several times the size of the streams they replaced.
  • A paired remediation gives each engine a turn before it stops. With WithPDFUA, a PDF/UA round that repaired nothing ended the remediation even when the PDF/A engine still had a repair it had deferred to its next round, such as annotation colours judged against an output intent it had just changed (ISO 19005-1, 6.5.3).