Table of Contents

Class Document

Namespace
Rustaveli.Pdf
Assembly
Rustaveli.Pdf.dll

A composed document, ready to be rendered.

public sealed class Document : IComposition
Inheritance
Document
Implements
Inherited Members
Extension Methods

Remarks

A document owns the tree of blocks its composing built, and laying it out records progress in that tree — how many lines of a paragraph have been drawn, which table rows remain. An export uses the tree when no other export is, and each resets it before it starts. An export that begins while another is under way composes the document afresh for itself, running the composing code again, so one document may be exported from any number of threads at once.

Properties

Info

public DocumentInfo Info { get; }

Property Value

DocumentInfo

PageLimit

The most pages the document may take, 10,000 unless set. Content that never stops asking for another page — a frame that reports more to come but takes no room — fails once it passes this, rather than running forever.

public int PageLimit { get; set; }

Property Value

int

Styles

The document's named type, paragraph and frame styles.

public StyleSheet Styles { get; }

Property Value

StyleSheet

Methods

Compose(Action<IComposition>)

Builds a document by invoking compose, which declares one or more page runs. It is invoked again for an export that begins while another is laying the document out.

public static Document Compose(Action<IComposition> compose)

Parameters

compose Action<IComposition>

Returns

Document

Merge(params Document[])

A document of every page of documents, one after another, numbered on from one to the next unless NumberPartsSeparately() says otherwise. It describes itself as the first does.

public static Document Merge(params Document[] documents)

Parameters

documents Document[]

Returns

Document

NumberPartsSeparately()

Numbers each merged document's pages from 1, and counts only its own pages in "page 3 of 7", as each would be numbered printed alone.

public Document NumberPartsSeparately()

Returns

Document