PdfBatesNumbering class
Sequential Bates-style numbering applied to a range of pages.
The Bates number is the identification stamp used in legal proceedings and
evidentiary documentation: a fixed prefix, a counter with a constant digit
count and, optionally, a suffix — PROC-000042. Each page gets the next
number, always in the same position.
const bates = PdfBatesNumbering(prefix: 'PROC-', digits: 6);
bates.applyToDocument(document);
The stamp goes in as an overlay isolated by a PdfPageContentEditor, so the original page content stays intact.
Constructors
- PdfBatesNumbering({String prefix = '', String suffix = '', int start = 1, int step = 1, int digits = 6, PdfFont? font, double fontSize = 9, PdfColor color = PdfColors.black, PdfStampAnchor anchor = PdfStampAnchor.bottomRight, double marginX = 24, double marginY = 24, PdfBoxType reference = PdfBoxType.crop})
-
Configures the numbering.
const
Properties
- anchor → PdfStampAnchor
-
Position of the stamp within the visible area.
final
- color → PdfColor
-
Text color.
final
- digits → int
-
Minimum digit count, padded with leading zeros.
final
- font → PdfFont?
-
The font; when null, a Helvetica shared by the document.
final
- fontSize → double
-
Font size, in display points.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- marginX → double
-
Horizontal distance to the edge.
final
- marginY → double
-
Vertical distance to the edge.
final
- prefix → String
-
Fixed text before the number.
final
- reference → PdfBoxType
-
Box that defines the visible area used to position the stamp.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
Number of the first numbered page.
final
- step → int
-
How much the counter advances from one page to the next.
final
- suffix → String
-
Fixed text after the number.
final
Methods
-
applyToDocument(
PdfDocument document, {int from = 0, int? to}) → int -
Numbers the pages of
documentin the range[from, to), zero based. -
applyToPages(
Iterable< PdfPage> pages) → int - Numbers exactly the given pages, in the order received.
-
format(
int number) → String -
The text stamped for a given
number. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited