Skip to main content

Module update

Module update 

Source
Expand description

Incremental updates to an existing file (ISO 32000-1 §7.5.6): the base bytes stay in place and an update section appends new and replaced objects plus a cross-reference section chained to the base’s by /Prev, in the base’s own cross-reference style.

Functions§

watermark
Draws the first page of overlay over every page of base, returning base’s bytes followed by an incremental update: the overlay page as one form XObject (its resources copied into the base’s object space), and each page’s dictionary rewritten with that form in its resources and its content wrapped in q … Q before the form is drawn. Pages inlined directly into /Kids, having no object of their own, are left as they are. An encrypted base is refused: its new strings and streams would need encrypting too.
watermark_with
Like watermark, but writes a fresh file through the Writer under options instead of appending an update: every object the base’s catalog reaches is copied over, uncompressed streams are compressed when options.compress is set, and unreachable objects and earlier sections are left behind, so the result is usually smaller than the base.