mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-26 19:19:10 -06:00
The signing saves wrote with default options, so a redaction mark added and cleared in the session (or a comment added and deleted) reached the file through a signature, a timestamped signature, embedded LTV evidence or a document timestamp, with its QuadPoints, overlay text and authors. A signed revision can't be changed afterwards, so nothing could take it out again. `sign`, `sign_with_timestamp` and `dss::embed` now save with `drop_unlinked`: everything they add is reachable (the signature through the field's `/V`, the store from the catalog), and the ByteRange placeholder is found in the written bytes. `timestamp_document` can't: its `/DocTimeStamp` dictionary has no field pointing to it, so the option would drop it and every document timestamp would fail with "ByteRange placeholder not found". It frees the leftovers first with the new `Document::free_unlinked_additions`, which frees exactly what the option leaves out, and then adds the dictionary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>