PageNumberStamp

PageNumberStamp

Overview

PageNumberStamp is a class in Aspose.PDF FOSS for .NET. Inherits from: Aspose.Pdf.Stamps.Stamp.

A stamp that adds page numbers to PDF pages.

This class provides 1 method for working with PageNumberStamp objects in .NET programs. Available methods include: ApplyToAll. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Background, BottomMargin, Color, FontName, FontSize, Format, and 14 more.

Properties

NameTypeAccessDescription
FormatstringRead/WritePage number format.
StartingNumberintRead/WriteStarting page number.
FontNamestringRead/WriteFont name.
FontSizedoubleRead/WriteFont size in points.
TextStateTextStateReadText state for the page number; setting TextState.FontSize updates the stamp’s FontSize on the next stamp emission.
Color(double R, double G, double B)Read/WriteText color as RGB (0-1 range).
StampIdintRead/WriteOptional identifier embedded as a %StampId content-stream comment when the stamp is applied, so PdfContentEditor.GetStamps / DeleteStampById can find it later.
XIndentdoubleRead/WriteX position on the page.
YIndentdoubleRead/WriteY position on the page.
RotateRotationRead/WriteRotation (0, 90, 180, 270).
RotateAngledoubleRead/WriteArbitrary rotation angle in degrees.
OpacitydoubleRead/WriteOpacity (0.0 = transparent, 1.0 = opaque).
IsBackgroundboolRead/WriteWhether the stamp is drawn behind page content.
BackgroundboolRead/WriteAlias for IsBackground.
TopMargindoubleRead/WriteTop margin offset in points.
BottomMargindoubleRead/WriteBottom margin offset in points.
LeftMargindoubleRead/WriteLeft margin offset in points.
RightMargindoubleRead/WriteRight margin offset in points.
HorizontalAlignmentHorizontalAlignmentRead/WriteHorizontal alignment.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment.

Methods

SignatureDescription
ApplyToAll(document: Document)Apply this stamp to all pages in the document.

See Also