PdfBates Class

Stamps continuous Bates numbers on the pages of several documents, such as the documents of a legal production.

public static class PdfBates

Methods

NameDescription
Apply(IEnumerable<PdfDocument>, PdfHeaderFooterOptions)Stamps the headers and footers of the options on the pages of the documents, in order: the numbers of a document follow those of the previous one, from PdfBatesNumbering.StartNumber. Only the pages stamped (PdfHeaderFooterOptions.FirstPageIndex to PdfHeaderFooterOptions.LastPageIndex) are numbered.

Apply(IEnumerable<PdfDocument>, PdfHeaderFooterOptions)

PdfBates.cs

Stamps the headers and footers of the options on the pages of the documents, in order: the numbers of a document follow those of the previous one, from PdfBatesNumbering.StartNumber. Only the pages stamped (PdfHeaderFooterOptions.FirstPageIndex to PdfHeaderFooterOptions.LastPageIndex) are numbered.

Parameters

documents IEnumerable<PdfDocument>
The documents, in the order of the production.
options PdfHeaderFooterOptions
The headers and footers, whose texts use the {bates} token, and the Bates numbering (PdfHeaderFooterOptions.Bates).

Returns

IReadOnlyList<PdfBatesRange> The range of numbers of each document. A document with no page stamped has an empty range: its last number is the one before its first.

Exceptions

ArgumentException
PdfHeaderFooterOptions.Bates is not set, or a text is not valid (see PdfDocument.AddHeaderFooter).