Class PdfContentEditor

PdfContentEditor 类

表示一个用于编辑 PDF 文件内容的类。

public sealed class PdfContentEditor : SaveableFacade

构造函数

名称描述
PdfContentEditor()PdfContentEditor 对象的构造函数。
PdfContentEditor(Document)基于 document 初始化新的 PdfContentEditor 对象。

属性

名称描述
Document { get; }获取文档外观正在处理的文档。
ReplaceTextStrategy { get; set; }替换文本操作的一组参数
TextEditOptions { get; set; }获取或设置文本编辑选项。
TextReplaceOptions { get; set; }获取或设置文本替换选项。
TextSearchOptions { get; set; }获取或设置文本搜索选项。

方法

名称描述
AddDocumentAdditionalAction(string, string)为文档事件添加额外的操作。
AddDocumentAttachment(string, string)添加没有注释的文档附件。
AddDocumentAttachment(Stream, string, string)添加没有注释的文档附件。
virtual BindPdf(Document)初始化外观。
override BindPdf(Stream)绑定用于编辑的 PDF 流。
override BindPdf(string)绑定用于编辑的 PDF 文件。
ChangeViewerPreference(int)更改视图偏好。
override Close()关闭已打开的文档。
CreateApplicationLink(Rectangle, string, int)创建一个链接以在 PDF 文档中启动应用程序。
CreateApplicationLink(Rectangle, string, int, Color)创建一个链接以在 PDF 文档中启动应用程序。
CreateApplicationLink(Rectangle, string, int, Color, Enum[])创建一个链接以在 PDF 文档中启动应用程序。
CreateBookmarksAction(string, Color, bool, bool, string, string, string)创建具有指定操作的书签。
CreateCaret(int, Rectangle, Rectangle, string, string, Color)创建插入符号注释。
CreateCustomActionLink(Rectangle, int, Color, Enum[])创建一个链接以在 PDF 文档中执行自定义操作。
CreateFileAttachment(Rectangle, string, string, int, string)创建文件附件注释。
CreateFileAttachment(Rectangle, string, Stream, string, int, string)创建文件附件注释。
CreateFileAttachment(Rectangle, string, string, int, string, double)创建文件附件注释。
CreateFileAttachment(Rectangle, string, Stream, string, int, string, double)创建文件附件注释。
CreateFreeText(Rectangle, string, int)在 PDF 文档中创建自由文本注释
CreateJavaScriptLink(string, Rectangle, int, Color)创建一个链接到 PDF 文档中的 JavaScript。
CreateLine(Rectangle, string, float, float, float, float, int, int, Color, string, int[], string[])创建线条注释。
CreateLocalLink(Rectangle, int, int)在 PDF 文档中创建本地链接。
CreateLocalLink(Rectangle, int, int, Color)在 PDF 文档中创建本地链接。
CreateLocalLink(Rectangle, int, int, Color, Enum[])在 PDF 文档中创建本地链接。
CreateMarkup(Rectangle, string, int, int, Color)在 PDF 文档中创建标记注释。
CreateMovie(Rectangle, string, int)创建电影注释。
CreatePdfDocumentLink(Rectangle, string, int, int)创建指向另一个 PDF 文档页面的链接。
CreatePdfDocumentLink(Rectangle, string, int, int, Color)创建指向另一个 PDF 文档页面的链接。
CreatePdfDocumentLink(Rectangle, string, int, int, Color, Enum[])创建指向另一个 PDF 文档页面的链接。
CreatePolygon(LineInfo, int, Rectangle, string)创建多边形注释。
CreatePolyLine(LineInfo, int, Rectangle, string)创建折线注释。
CreatePopup(Rectangle, string, bool, int)在 PDF 文档中创建弹出注释。
CreateRubberStamp(int, Rectangle, string, Color, Stream)创建橡皮章注释。
CreateRubberStamp(int, Rectangle, string, Color, string)创建橡皮章注释。
CreateRubberStamp(int, Rectangle, string, string, Color)创建橡皮章注释。
CreateSound(Rectangle, string, string, int, string)创建声音注释。
CreateSquareCircle(Rectangle, string, Color, bool, int, int)创建方形-圆形注释。
CreateText(Rectangle, string, string, bool, string, int)在 PDF 文档中创建文本注释
CreateWebLink(Rectangle, string, int)在 PDF 文档中创建网页链接。
CreateWebLink(Rectangle, string, int, Color)在 PDF 文档中创建网页链接。
CreateWebLink(Rectangle, string, int, Color, Enum[])在 PDF 文档中创建网页链接。
DeleteAttachments()删除 PDF 文档中的所有附件。
DeleteImage()从 PDF 文档中删除所有图像。
DeleteImage(int, int[])删除指定页面上的指定图像。
DeleteStamp(int, int[])根据印章索引删除指定页面上的多个印章。
DeleteStampById(int)从文档的所有页面中按 ID 删除印章。
DeleteStampById(int, int)根据印章 ID 删除指定页面上的印章。
DeleteStampByIds(int[])从文档的所有页面中删除具有指定 ID 的印章。
DeleteStampByIds(int, int[])根据多个印章 ID 删除指定页面上的印章。
Dispose()处理外观。
DrawCurve(LineInfo, int, Rectangle, string)创建曲线注释。
ExtractLink()提取 PDF 文档中包含的链接实例集合。
GetStamps(int)返回页面上的印章数组。
GetViewerPreference()返回视图偏好。
HideStampById(int, int)隐藏印章。隐藏后,可以使用 ShowStampById 方法恢复印章的可见性。
MoveStamp(int, int, double, double)更改页面上印章的位置。
MoveStampById(int, int, double, double)更改页面上印章的位置。
RemoveDocumentOpenAction()从文档中移除打开操作。此操作在连接多个使用显式“转到”操作启动的文档时非常有用。
ReplaceImage(int, int, string)用另一张图像替换 PDF 文档指定页面上的指定图像。
ReplaceText(string, string)替换 PDF 文件中的文本。
ReplaceText(string, int, string)替换指定页面上 PDF 文件中的文本。
ReplaceText(string, string, int)替换 PDF 文件中的文本并设置字体大小。
ReplaceText(string, string, TextState)使用指定的 TextState 对象替换 PDF 文件中的文本。
ReplaceText(string, int, string, TextState)替换指定页面上 PDF 文件中的文本。可以指定 TextState 对象(字体系列、颜色)来替换文本。
virtual Save(Stream)将 PDF 文档保存到指定流。
virtual Save(string)将 PDF 文档保存到指定文件。
ShowStampById(int, int)显示被 HiddenStampById 隐藏的印章。

字段

名称描述
const DocumentClose一种文档事件类型。关闭文档。
const DocumentOpen一种文档事件类型。打开文档。
const DocumentPrinted一种文档事件类型。打印后执行操作。
const DocumentSaved一种文档事件类型。保存后执行操作。
const DocumentWillPrint一种文档事件类型。打印前执行操作。
const DocumentWillSave一种文档事件类型。保存前执行操作。

另请参阅