PageNumberStamp

PageNumberStamp

概述

PageNumberStamp 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:Aspose.Pdf.Stamps.Stamp。

在 PDF 页面上添加页码的印章。

此类提供 2 个方法,用于在 .NET 程序中处理 PageNumberStamp 对象。可用方法包括:ApplyToAll、setStampId。在安装了 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Background、BottomMargin、Color、FontName、FontSize、Format,以及另外 17 项。

属性

名称类型访问描述
Formatstring读写页码格式。
StartingNumberint读写起始页码。
FontNamestring读写字体名称。
FontSizedouble读写字体大小(点)。
TextStateTextState读取页面编号的文本状态;设置 TextState.FontSize 会在下次印章发出时更新印章的 FontSize。
Color(double R, double G, double B)读写文本颜色采用 RGB(0-1 范围)。
StampIdint读写在应用印章时,可选标识符会作为 %StampId 内容流注释嵌入,以便 PdfContentEditor.GetStamps / DeleteStampById 稍后能够找到它。
ZoomXdouble读写印章的水平缩放因子(1.0 = 原始大小)。
ZoomYdouble读写对印章应用的垂直比例因子(1.0 = 原始大小)。
XIndentdouble读写页面上的 X 位置。
YIndentdouble读写页面上的 Y 位置。
RotateRotation读写旋转(0, 90, 180, 270)。
RotateAngledouble读写任意旋转角度(以度为单位)。
Opacitydouble读写不透明度 (0.0 = 透明, 1.0 = 不透明)。
IsBackgroundbool读写印章是否绘制在页面内容后面。
Backgroundbool读写IsBackground 的别名。
TopMargindouble读写顶部边距偏移(单位为点)。
BottomMargindouble读写底部边距偏移(单位为点)。
LeftMargindouble读写左侧边距偏移(单位为点)。
RightMargindouble读写右边距偏移(单位:点)。
HorizontalAlignmentHorizontalAlignment读写水平对齐。
VerticalAlignmentVerticalAlignment读写垂直对齐。
OutlineWidthdouble读写印章字形/图形轮廓的描边宽度,单位为点。

方法

签名描述
ApplyToAll(document: Document)将此印章应用于文档中的所有页面。
setStampId(id: int)设置 StampId。

另请参阅

 中文