Table of Contents

Method AppendRange

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

AppendRange(int, PageRange)

Appends the selected pages of a source, in ascending page order.

public PdfPageAssembly AppendRange(int sourceIndex, PageRange pages)

Parameters

sourceIndex int

The index returned by an AddSource call.

pages PageRange

The 1-based selection, for example PageRange.Parse("1-3,7").

Returns

PdfPageAssembly

This instance, so appends can be chained.

Remarks

A PageRange is a sorted, disjoint set of pages, so it selects which pages appear and never what order they appear in — "3,1" and "1,3" are the same selection. Use Reorder(byte[], IReadOnlyList<int>, Stream, PdfAssemblyOptions?) or repeated AppendPage(int, int) calls when the order matters.

Exceptions

ArgumentOutOfRangeException

The index names no source.