PdfRevision Class

A revision of a document (ISO 32000-2, 7.5.6): the file as it was written by a full save or by one of the incremental updates that follow it. A revision is a prefix of the file, so the document as it was then can be read back.

public sealed class PdfRevision

Properties

NameDescription
IndexGets the zero-based index of the revision: 0 for the original file, then one per incremental update.
IsLatestGets a value indicating whether the revision is the last one of the file.
LengthGets the length of the revision in bytes: the prefix of the file it is made of.

Gets the zero-based index of the revision: 0 for the original file, then one per incremental update.

public int Index { get; }

Property value

int

Gets a value indicating whether the revision is the last one of the file.

public bool IsLatest { get; }

Property value

bool

Gets the length of the revision in bytes: the prefix of the file it is made of.

public long Length { get; }

Property value

long

Methods

NameDescription
GetModifications()Lists the changes made after this revision: the objects, pages, annotations, form fields and signatures that differ between this revision and the document as it is now, the changes not saved yet included.
Open(PdfReadOptions?)Opens the document as it was in this revision.

GetModifications()

PdfRevision.cs

Lists the changes made after this revision: the objects, pages, annotations, form fields and signatures that differ between this revision and the document as it is now, the changes not saved yet included.

public IReadOnlyList<PdfModification> GetModifications()

Returns

IReadOnlyList<PdfModification> The changes, by kind.

Exceptions

InvalidPdfContentException
The revision cannot be read.

Open(PdfReadOptions?)

PdfRevision.cs

Opens the document as it was in this revision.

public PdfDocument Open(PdfReadOptions? options = null)

Parameters

options PdfReadOptions?
The read options, or null for those the document was opened with.

Returns

PdfDocument The document of the revision.

Exceptions

InvalidPdfContentException
The revision cannot be read.
PdfResourceLimitException
The revision is larger than 2 GB.