Table of Contents

Method AppendPage

Namespace
DocWright.Formats.Pdf
Assembly
DocWright.Formats.Pdf.dll

AppendPage(int, int)

Appends one page of a source, and may be called again for the same page.

public PdfPageAssembly AppendPage(int sourceIndex, int pageNumber)

Parameters

sourceIndex int

The index returned by an AddSource call.

pageNumber int

The 1-based page number within that source.

Returns

PdfPageAssembly

This instance, so appends can be chained.

Remarks

Appending the same page twice produces two pages in the output. They are distinct page objects — a page node appears once in a page tree — but they share one copy of the content streams, fonts and images behind them, so a duplicated page costs a dictionary rather than a document.

Exceptions

ArgumentOutOfRangeException

The index names no source, or the page number is outside that source.