PdfDocumentSummary Class
A summary of the structure of a document: its pages, and the graph of the objects reachable from the trailer, with a digest that does not depend on the numbers of the objects.
public sealed class PdfDocumentSummaryRemarks
Two documents with the same digest have the same objects, linked the same way, whatever their object numbers, their cross-reference sections and their object streams. The digest ignores the entries of the trailer that describe the file rather than the document (/ID, /Size, /Prev, /XRefStm, /Encrypt), and compares the streams by their encoded data and dictionary.
Properties
| Name | Description |
|---|---|
| Digest | Gets the SHA-256 digest of the object graph, in hexadecimal, independent of the object numbers. |
| ObjectCount | Gets the number of indirect objects reachable from the trailer. |
| ObjectKinds | Gets the number of indirect objects reachable from the trailer, by kind. |
| ObjectTypes | Gets the number of indirect dictionaries and streams reachable from the trailer, by their /Type (the dictionaries without type are not counted). |
| Pages | Gets the summaries of the pages, in order. |
Digest
PdfDocumentSummary.csObjectCount
PdfDocumentSummary.csObjectKinds
PdfDocumentSummary.csGets the number of indirect objects reachable from the trailer, by kind.
public IReadOnlyDictionary<PdfObjectKind, int> ObjectKinds { get; }Property value
ObjectTypes
PdfDocumentSummary.csGets the number of indirect dictionaries and streams reachable from the trailer, by their /Type (the dictionaries without type are not counted).
public IReadOnlyDictionary<string, int> ObjectTypes { get; }Property value
Gets the summaries of the pages, in order.
public IReadOnlyList<PdfPageSummary> Pages { get; }Property value
Methods
| Name | Description |
|---|---|
| Create(PdfDocument) | Summarizes a document. |
Create(PdfDocument)
PdfDocumentSummary.csSummarizes a document.
public static PdfDocumentSummary Create(PdfDocument document)Parameters
documentPdfDocument- The document.
Returns
PdfDocumentSummary The summary.
Exceptions
PdfException- The page tree of the document cannot be read.