pdftools_sdk.pdf.revision

Classes

Revision(handle)

The document revision

class pdftools_sdk.pdf.revision.Revision(handle)[source]

Bases: _NativeObject

The document revision

An incremental update to a PDF creates a new revision. A revision is defined by the update itself and all updates that came before, including the initial document. An update can introduce changes to the document (visible or invisible), it can sign the current revision, or it can do both. But an update can only ever hold one valid signature.

write(stream: IOBase) None[source]

Write the contents of the document revision to a stream

Parameters:

stream (io.IOBase) – The stream to which the revision is written.

Raises:

OSError – Unable to write to the stream.

property is_latest: bool

Whether this is the latest document revision

Returns:

bool

property has_non_signing_updates: bool

Whether the revision contains a non-signing update.

Returns True if any update leading up to this revision does not contain a signature. Returns False if every update that leads up to this revision contains a signature.

Returns:

bool