RedactAnnotation
概述
RedactAnnotation 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:RedactionAnnotation。
向后兼容的别名,指向 RedactionAnnotation。
此类提供 9 个方法,用于在 .NET 程序中处理 RedactAnnotation 对象。可用方法包括:Accept、ChangeAfterResize、Clone、Flatten、GetRectangle、Redact、RedactionAnnotation、UpdateAppearances、WriteXfdf。在安装了面向 .NET 的 Aspose.PDF FOSS 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Action、Actions、ActiveState、Alignment、AnnotationFlags、AnnotationState,以及另外 52 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
AnnotationType | AnnotationType | 读取 | 获取注释类型。 |
DefaultAppearance | string | 读写 | 默认外观字符串(/DA)已应用于覆盖文本。 |
FontSize | float | 读写 | 覆盖文本使用的字体大小。 |
OverlayText | string? | 读写 | 覆盖文本(/OverlayText 条目)。 |
Repeat | bool | 读写 | 是否应重复覆盖文本(/Repeat 条目)。 |
Justification | int | 读写 | 对齐方式:0=左,1=居中,2=右(/Q 条目)。 |
TextAlignment | HorizontalAlignment | 读写 | 覆盖文本的对齐方式(映射到 /Q)。 |
FillColor | Color? | 读写 | 填充颜色(/IC 条目)。 |
BorderColor | Color? | 读写 | 边框颜色(/C 条目 — 与 Color 相同但已键入;保留此项是为了方便遮蔽代码区分边框与。). |
Popup | PopupAnnotation? | 读取 | 与此遮蔽关联的弹出注释(/Popup 条目),或为 null。 |
QuadPoint | Point[]? | 读写 | QuadPoints(/QuadPoints 条目)定义注释的 Rect 内的子矩形。 |
CreationDate | DateTime | 读写 | 将 /CreationDate 视为 DateTime。 |
Rect | Rectangle? | 读写 | 注释矩形(页面上的位置)。 |
InnerRect | Rectangle? | 读取 | 注释矩形通过 /RD(矩形差异)条目向内缩进 — 实际在 Rect 内绘制的区域。 |
Width | double | 读写 | 注释矩形的宽度。 |
Height | double | 读写 | 注释矩形的高度。 |
ActiveState | string? | 读写 | 当前活动的外观状态(/AS 条目)。 |
Alignment | TextAlignment | 读写 | 文本对齐(用于包含富文本的自由文本/小部件注释)。 |
HorizontalAlignment | Aspose.Pdf.HorizontalAlignment | 读写 | 水平对齐(Aspose.Pdf 在除 Alignment 之外还提供此功能;两者可独立设置)。 |
TextHorizontalAlignment | Aspose.Pdf.HorizontalAlignment | 读写 | 文本特定的水平对齐覆盖。 |
Appearance | AppearanceDictionary | 读取 | 外观字典(/AP 条目)——以外观流名称 (N, D, R) 为键。 |
States | AppearanceDictionary | 读取 | 外观状态字典(AP/N 的每个状态子字典,例如). |
NormalAppearance | XForm? | 读取 | 注释的常规 (/AP /N) 外观,以 XForm 表示;如果没有则为 null。 |
UpdateAppearanceOnConvert | bool | 读写 | 在将注释保存到已转换的文档时,是否重新生成外观流。 |
UseFontSubset | bool | 读写 | 是否应对嵌入的字体(如果有)进行子集化。 |
Contents | string? | 读写 | 注释内容(文本)。 |
Opacity | double | 读写 | 注释不透明度(0.0 = 透明,1.0 = 不透明)。 |
Border | Border? | 读写 | 标注边框。 |
Color | Color | 读写 | 标注边框颜色(/C 条目)。 |
InteriorColor | Color? | 读写 | 标注内部颜色(/IC 条目,适用于圆形/方形/线条标注)。 |
Title | string? | 读写 | 注释标题(标注注释的作者)。 |
Name | string? | 读写 | 注释名称(唯一标识符 — /NM 条目)。 |
FullName | string? | 读取 | 完全限定的注释名称。 |
Subject | string? | 读写 | 注释主题(/Subj 条目)。 |
ModifiedDate | string? | 读取 | 修改日期。 |
Modified | DateTime | 读写 | /M(已修改)日期,以键入的 DateTime 形式。 |
Flags | AnnotationFlags | 读写 | Annotation flags (/F entry) — 用作 int 和 typed 形式的存储后端。 |
AnnotationFlags | AnnotationFlags | 读写 | Flags 的类型化别名,匹配 Aspose.Pdf 的公共表面,并将 AnnotationFlags 公开为属性。 |
Action | PdfAction? | 读写 | 与此注释关联的操作 (/A entry)。 |
Actions | PdfActionCollection | 读取 | 与此注释关联的操作集合。 |
Author | string? | 读取 | 注释作者(/T 条目)。 |
AnnotationState | string? | 读取 | 注释状态(/State 条目),例如: |
AnnotationStateModel | string? | 读取 | 注释状态模型(/StateModel 条目),例如: |
ReplyType | string? | 读取 | 回复类型(/RT 条目),例如: |
InReplyTo | Annotation? | 读写 | 此注释正在回复的注释(/IRT 条目)。 |
QuadPoints | Point[] | 读写 | QuadPoints 作为 Point 值的数组。 |
Characteristics | Characteristics | 读取 | 外观特性(边框颜色、背景颜色、旋转)。 |
PageIndex | int | 读取 | 拥有此注释的页面的从1开始的索引。 |
Page | Page? | 读取 | 拥有此注释的页面,如果无法解析则为 null(例如. |
VerticalAlignment | VerticalAlignment | 读写 | 已将垂直对齐应用于此段落。 |
Margin | MarginInfo | 读写 | 外边距信息已应用于此段落。 |
IsFirstParagraphInColumn | bool | 读写 | 强制段落在新列开始。 |
IsKeptWithNext | bool | 读写 | 保持此段落与下一段落在同一页。 |
IsInNewPage | bool | 读写 | 强制段落在新页面开始。 |
IsInLineParagraph | bool | 读写 | 内联段落标志(不另起新行)。 |
HyperlinkText | string? | 读写 | 遗留的字符串类型超链接目标。 |
Hyperlink | Hyperlink? | 读写 | 已对段落应用的超链接装饰(带类型)。 |
ZIndex | int | 读写 | DOM 渲染器使用的 Z 顺序索引。 |
方法
| 签名 | 描述 |
|---|---|
RedactionAnnotation(page: Page, rect: Rectangle) | 为给定的页面矩形创建新的 redaction annotation。 |
Flatten() | 将此 redaction 的覆盖层展平到页面上。 |
Redact() | 将此注释展平并删除其矩形内的底层内容:物理删除位于 redaction 矩形下的文字字形(使其不再可被提取),随后在矩形上绘制 FillColor 作为不透明覆盖层。 |
Accept(visitor: AnnotationSelector) | 对该 RedactAnnotation 实例调用 Accept(visitor)。 |
GetRectangle(considerRotation: bool) | 边界矩形已通过 considerRotation 调整。 |
ChangeAfterResize(transform: Matrix) | 在用户调整页面或宿主矩形大小后,调整注释的几何形状。 |
UpdateAppearances() | 根据注释当前的几何形状和颜色重新生成普通外观流 (/AP /N)。 |
WriteXfdf(writer: System.Xml.XmlWriter) | 将此注释序列化为 XFDF 元素写入 writer(PDF 32000 §12.7.8 / XFDF 3.0)。 |
Clone() | 浅克隆 — 复制标量/引用共享状态。 |