Document
概述
Document 是 Aspose.PDF FOSS 用于 .NET 的一个类。继承自:IDisposable。
表示一个 PDF 文档。
此类在 .NET 程序中提供用于操作 Document 对象的 149 个方法。可用的方法包括:AddEmbeddedFile、AddNamedDestination、BindXml、ChangePasswords、Check、Convert、ConvertPageToPNGMemoryStream、Create、Decrypt、Dispose、Document、Encrypt,以及另外 41 个方法。安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Actions、AllowReusePageContent、Background、CenterWindow、Collection、CryptoAlgorithm,以及另外 71 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
IsLicensed | bool | 读取 | 是否已应用许可证。 |
JavaScript | JavaScriptCollection | 读取 | 文档级 JavaScript(PDF 规范 §12.6.4.16 — 目录中的 /Names/JavaScript 名称树)。 |
Pages | PageCollection | 读取 | 此文档中的页面集合。 |
Info | DocumentInfo | 读取 | 文档信息字典(标题、作者等)。 |
FileName | string? | 读取 | 此文档加载自的文件名/路径,如果是从流加载则为 null。 |
EnableObjectUnload | bool | 读写 | 是否在使用后卸载大型对象以减轻内存压力。 |
PdfVersion | string? | 读取 | 文件头中指示的 PDF 版本(例如 “1.4”、 “1.7”、 “2.0”)。 |
PageCount | int | 读取 | 对 Pages.Count 的快捷方式。 |
Version | string? | 读取 | PdfVersion 的别名。 |
IsPdfaCompliant | bool | 读取 | 如果文档声明其符合 PDF/A,则为真。 |
PdfFormat | Aspose.Pdf.PdfFormat | 读取 | 返回此文档声明的 PDF 格式。 |
IsLinearized | bool | 读写 | 获取或设置是否线性化。 |
EnableSignatureSanitization | bool | 读写 | 当为 true(默认)时,写入器在保存期间会清除无效的签名引用。 |
_engineDoc | EngineDocFacade | 读取 | 已公开引擎句柄,以支持传统的 doc._engineDoc.X 访问模式。 |
Form | Form | 读取 | 交互式表单(AcroForm)。 |
HasForm | bool | 读取 | 文档是否包含交互式表单。 |
DisableFontLicenseVerifications | bool | 读写 | 是否禁用字体许可证验证检查。 |
FontUtilities | IDocumentFontUtilities | 读取 | 字体实用工具,用于子集化和字体管理。 |
Outlines | OutlineCollection | 读取 | 文档大纲(书签),如果不存在则为 null。 |
HasOutlines | bool | 读取 | 文档是否具有书签。 |
Collection | Collection? | 读写 | PDF Portfolio(collection)包装器 — 返回目录的 Collection 字典作为 Collection,如果文档不是 Portfolio,则返回 null。 |
Metadata | Metadata | 读取 | 文档的 XMP 元数据。 |
HasMetadata | bool | 读取 | 文档是否包含 XMP 元数据。 |
IsEncrypted | bool | 读取 | 文档是否已加密。 |
IsDecrypted | bool | 读取 | 文档是否已成功解密(即已初始化解密器)。 |
EncryptionInfo | EncryptionInfo? | 读取 | 加密详情,若未加密则为 null。 |
Permissions | int | 读取 | 来自加密字典的原始 /P 权限位掩码(PDF 32000-1:2008 表 22)。 |
OpenAction | IAppointment? | 读写 | 文档打开动作(在打开 PDF 时执行的动作或目标),或为 null。 |
PageInfo | PageInfo | 读写 | 在设置此项后添加的页面所使用的默认页面尺寸/页边距。 |
EmbeddedFiles | EmbeddedFileCollection | 读取 | 嵌入文件集合。 |
HasEmbeddedFiles | bool | 读取 | 文档是否包含嵌入的文件。 |
PageLabels | PageLabelCollection | 读取 | 页面标签,或 null。 |
HasPageLabels | bool | 读取 | 文档是否具有页面标签。 |
HasCollection | bool | 读取 | 文档是否为 PDF 组合文档(在目录中具有 /Collection 字典)。 |
OutputIntents | OutputIntents | 读取 | 文档目录中声明的输出意图。 |
Destinations | DestinationCollection | 读取 | 提供目的地查找方法(例如,按目的地名称的 GetPageNumber)。 |
HasDestinations | bool | 读取 | 文档是否包含已命名的目标。 |
NamedDestinations | NamedDestinationCollection | 读取 | 文档中的已命名目标。 |
OptionalContent | OptionalContentProperties? | 读取 | 可选内容属性(层),如果没有则为 null。 |
HasLayers | bool | 读取 | 文档是否包含可选内容(层)。 |
ViewerPreferences | ViewerPreferences? | 读取 | 控制文档显示方式的查看器偏好设置。 |
CenterWindow | bool | 读写 | /CenterWindow 查看器首选项:将文档窗口置于屏幕中心。 |
FitWindow | bool | 读写 | /FitWindow 查看器首选项:将窗口大小调整为适合首个显示的页面。 |
DisplayDocTitle | bool | 读写 | /DisplayDocTitle 查看器首选项:在窗口标题栏中显示文档标题,而不是文件名。 |
PageLayoutName | string? | 读写 | 原始 /PageLayout 名称从目录读取(例如 “SinglePage”,“TwoColumnLeft”)。 |
PageModeName | string? | 读写 | 原始 /PageMode 名称从目录读取(例如 “UseNone”,“UseOutlines”)。 |
PageLayout | PageLayout | 读写 | /PageLayout 条目作为已类型化的枚举。 |
PageMode | PageMode | 读写 | 将 /PageMode 条目视为带类型的枚举。 |
NonFullScreenPageMode | PageMode | 读写 | /NonFullScreenPageMode 查看器偏好(离开全屏时恢复的页面模式)。 |
PrintScaling | PrintScaling | 读写 | 该 /PrintScaling 查看器首选项。 |
Duplex | PrintDuplex | 读写 | 查看器的 /Duplex 首选项(未设置时默认为 Simplex)。 |
Direction | Direction | 读写 | 查看器的 /Direction 首选项(文本流方向)。 |
CryptoAlgorithm | CryptoAlgorithm? | 读取 | 正在使用的加密算法;如果文档未加密则为 null。 |
Id | Id? | 读取 | 来自 trailer 的 /ID 数组,若没有 /ID 条目则为 null。 |
IsPdfUaCompliant | bool | 读取 | 当文档的 XMP 元数据包含 pdfuaid:part 条目(PDF/UA-1 标识符)时为 true。 |
Language | string? | 读写 | 文档的自然语言(BCP 47)。 |
IsTagged | bool | 读取 | 文档是否为标记 PDF。 |
HasStructTree | bool | 读取 | 文档是否具有结构树。 |
StructTreeRoot | Aspose.Pdf.Tagged.StructTreeRoot? | 读取 | 用于读取带标签文档逻辑结构的结构树根 (/StructTreeRoot),如果文档未标记则为 null。 |
LogicalStructure | Aspose.Pdf.Structure.RootElement | 读取 | 文档逻辑结构树的根节点。 |
TaggedContent | Tagged.ITaggedContent | 读取 | 用于可访问性元数据和逻辑结构树的 Tagged-content surface。 |
OptimizeSize | bool | 读写 | 获取或设置一个标志,指示在保存时是否应对文档进行大小优化。 |
EmbedStandardFonts | bool | 读写 | 当为 true 时,标准的 14 种 PostScript 字体(Helvetica / Times / Courier × 4 种样式 + Symbol + ZapfDingbats)会嵌入保存的文档中,从而使输出在不依赖查看器端字体回退的情况下保持完全一致的呈现。 |
IgnoreCorruptedObjects | bool | 读写 | 当为 true 时,解析器容忍损坏的间接对象声明(对象之间的额外/乱码字节),而不是抛出异常。 |
Background | Color? | 读写 | 在保存过程中,文档整体的背景 colour 在每页内容之前被绘制。 |
Actions | Annotations.DocumentActionCollection | 读取 | Catalog /AA 附加操作字典。 |
CustomSecurityHandler | Security.ICustomSecurityHandler? | 读取 | 当通过 ICustomSecurityHandler Encrypt 重载设置时,存储自定义安全处理程序。 |
AllowReusePageContent | bool | 读写 | 是否允许 saver 重用相同的 page-content streams。 |
EnableNotificationLogging | bool | 读写 | 文档是否会发出 notification log entries。 |
HandleSignatureChange | bool | 读写 | 签名字段在其 dict 变更时是否触发 change-handlers。 |
HideMenubar | bool | 读写 | 查看器首选项:隐藏菜单栏(/ViewerPreferences /HideMenubar)。 |
HideToolBar | bool | 读写 | 查看器首选项:隐藏工具栏(/ViewerPreferences /HideToolbar)。 |
HideWindowUI | bool | 读写 | 查看器首选项:隐藏窗口 UI 装饰 (/ViewerPreferences /HideWindowUI). |
IsXrefGapsAllowed | bool | 读写 | 在解析期间允许 xref 表中出现间隙。 |
PickTrayByPdfSize | bool | 读写 | 查看器首选项:根据 PDF 页面大小选择纸盘 (/ViewerPreferences /PickTrayByPDFSize). |
FileSizeLimitToMemoryLoading | int | 读写 | 完全加载到内存中的最大文件大小(字节)。 |
DefaultNodesNumInSubtrees | byte | 读取 | 默认页面树分支因子(PDF 表 30 中 /Count 与 /Kids 的比例)。 |
方法
| 签名 | 描述 |
|---|---|
Document() | 创建一个新的空 PDF 文档(无参构造函数,与 public API 匹配)。 |
Document(filename: string) | 从文件路径打开 PDF 文档。 |
Document(version: PdfVersion) | 创建一个空文档,目标为给定的 PDF 规范版本。 |
Document(filename: string, password: string) | 使用密码从文件路径打开加密的 PDF 文档。 |
Document(filename: string, certOptions: Security.CertificateEncryptionOptions) | 使用提供的证书加密选项,从文件路径打开使用 Public-Key security-handler 加密的文档。 |
Document(filename: string, certOptions: Security.CertificateEncryptionOptions, isManagedStream: bool) | File ctor 带有 cert options 和 isManagedStream 标志(仅存储 — 内存中的字节缓冲区始终可重用)。 |
Document(input: Stream, certOptions: Security.CertificateEncryptionOptions) | 从流中打开使用 Public-Key security-handler 加密的文档。 |
Document(input: Stream, certOptions: Security.CertificateEncryptionOptions, isManagedStream: bool) | Stream ctor 带有 cert options 和 isManagedStream 标志。 |
Document(input: Stream, password: string) | 从流中使用密码打开加密的 PDF 文档。 |
Document(path: string, options: HtmlLoadOptions) | 打开一个 HTML 文件,并使用给定的选项将其转换为 PDF。 |
Document(stream: Stream, options: HtmlLoadOptions) | 打开一个 HTML 流,并使用给定的选项转换为 PDF。 |
Document(path: string, options: TxtLoadOptions) | 打开一个纯文本 (.txt) 文件,并使用给定的选项将其转换为 PDF。 |
Document(stream: Stream, options: TxtLoadOptions) | 打开一个纯文本流,并使用给定的选项将其转换为 PDF。 |
Document(path: string, options: MdLoadOptions) | 打开一个 Markdown 文件,并使用给定的选项将其转换为 PDF。 |
Document(stream: Stream, options: MdLoadOptions) | 打开一个 Markdown 流并使用给定的选项将其转换为 PDF。 |
Document(path: string, options: SvgLoadOptions) | 打开一个 SVG 文件并使用给定的选项将其转换为 PDF。 |
Document(stream: Stream, options: SvgLoadOptions) | 打开一个 SVG 流并使用给定的选项将其转换为 PDF。 |
Create() | 创建一个新的空 PDF 文档。 |
Open(data: byte[]) | 从字节数组打开 PDF 文档。 |
Open(data: byte[], password: string) | 使用密码从字节数组打开加密的 PDF 文档。 |
Open(path: string) | 从文件路径打开 PDF 文档。 |
Open(path: string, password: string) | 使用密码从文件路径打开加密的 PDF 文档。 |
Document(input: Stream) | 从流中打开 PDF 文档(构造函数,与公共 API 匹配)。 |
Open(stream: Stream) | 从流中打开 PDF 文档。 |
Open(stream: Stream, password: string) | 使用密码从流中打开加密的 PDF 文档。 |
Open(path: string, options: MdLoadOptions) | 打开 Markdown 文件并将其转换为 PDF 文档。 |
Open(data: byte[], options: MdLoadOptions) | 从字节打开 Markdown 文件并将其转换为 PDF 文档。 |
Open(path: string, options: SvgLoadOptions) | 打开 SVG 文件并将其转换为 PDF 文档。 |
Open(path: string, options: HtmlLoadOptions) | 从字节打开 SVG 文件并将其转换为 PDF 文档。 |
Open(data: byte[], options: HtmlLoadOptions) | 从字节打开 HTML 文件并将其转换为 PDF 文档。 |
Open(data: byte[], options: SvgLoadOptions) | 对该 Document 实例调用 Open(data, options)。 |
BindXml(file: string) | 将一个 Aspose.Pdf XML 模板绑定到此文档。 |
BindXml(stream: Stream) | 将一个来自流的 Aspose.Pdf XML 模板绑定到此文档。 |
BindXml(xmlStream: Stream, xslStream: Stream?) | 将一个来自流的 Aspose.Pdf XML 模板与可选的 XSLT 样式表流一起绑定。 |
BindXml(xmlStream: Stream, xslStream: Stream?, settings: System.Xml.XmlReaderSettings?) | 从流中绑定一个 Aspose.Pdf XML 模板,使用可选的 XSLT 样式表流,并为输入解析提供显式的 XmlReader 设置。 |
BindXml(xmlFile: string, xslFile: string?) | 将 Aspose.Pdf XML 模板绑定到可选的 XSLT 样式表。 |
Validate() | 验证文档结构并返回发现的任何问题。 |
Validate(outputLogStream: Stream, format: PdfFormat) | 根据特定的 PDF 格式(PDF/A,PDF/X)验证文档。 |
Validate(options: PdfFormatConversionOptions) | 使用转换选项,根据特定的 PDF 格式验证文档。 |
Validate(outputLogFileName: string, format: PdfFormat) | 根据特定的 PDF 格式验证文档,并将日志写入文件。 |
GetPdfACompliance() | 返回从 XMP 元数据检测到的 PDF/A 合规级别,如果不是 PDF/A 文档则返回 null。 |
IsRepairNeeded(options: RepairOptions) | 检查文档是否需要修复。 |
Repair() | 通过重新序列化来修复文档。 |
LinearizeDocument() | 将文档线性化以实现快速的网页浏览。 |
GetCatalogValue(key: string) | 按名称从文档的 /Catalog 中读取值。 |
Flatten() | 扁平化所有表单字段——将它们的视觉外观渲染到页面内容中并移除交互式表单。 |
Flatten(flattenSettings: Forms.Form.FlattenSettings) | 使用显式设置进行扁平化。 |
GetOrCreateMetadata() | 获取或创建此文档的 XMP 元数据。 |
AddEmbeddedFile(fileName: string, fileData: byte[]?, description: string?, mimeType: string?, compress: bool, creationDate: DateTime?, modDate: DateTime?) | 向文档添加嵌入文件。 |
AddNamedDestination(name: string, destination: DestinationArray) | 使用 /Names → /Dests 名称树向文档添加已命名的目标。 |
RemoveNamedDestination(name: string) | 从文档的 /Names → /Dests 名称树中移除已命名的目标。 |
HasIncrementalUpdate() | 如果此 PDF 使用增量更新(具有多个 %%EOF 标记),则返回 true。 |
SetVersion(version: string) | 设置输出头部的 PDF 版本(例如 “1.7”、 “2.0”)。 |
ImportPage(source: Document, pageNumber: int, insertAt: int) | 将另一个文档中的单页导入此文档。 |
ImportPages(source: Document, pageNumbers: int[], insertAt: int) | 将另一个文档中指定的页面导入此文档。 |
GetOrCreateViewerPreferences() | 获取或创建此文档的查看器首选项。 |
RemoveFormField(fieldName: string) | 从所有页面及AcroForm中按名称删除表单字段。 |
Dispose() | 对该 Document 实例调用 Dispose。 |
Convert(callback: CallBackGetHocr, flattenImages: bool) | 将每页渲染为图像,交给 OCR 回调,然后在页面上叠加返回的 hOCR 文本作为不可见的文本层(文本渲染模式 3,/Tr 3),使 PDF 可搜索且可复制粘贴。 |
Convert(callback: CallBackGetHocrWithPage, flattenImages: bool) | 对该 Document 实例调用 Convert(callback, flattenImages)。 |
Convert(callback: CallBackGetHocr) | 便利重载:等同于 Convert(CallBackGetHocr, bool) 并且 flattenImages = false. |
Convert(callback: CallBackGetHocrWithPage) | Convert(CallBackGetHocrWithPage, bool) 的便利重载,flattenImages = false。 |
MergeDocuments(documents) | 表示一个 PDF 文档。这是库的主要入口点。 |
MergeDocuments(files) | 在此 Document 实例上调用 MergeDocuments(files)。 |
Merge(documents) | 将每个文档条目的所有页合并到此文档中,保持原始顺序。 |
Merge(files) | 将 files 中每个文件的每一页合并到此文档中。 |
Merge(mergeOptions: MergeOptions, documents) | 使用显式选项进行合并。 |
Merge(mergeOptions: MergeOptions, files) | 使用显式选项合并文件 — 与 Document[] 重载具有相同的语义。 |
MergeDocuments(mergeOptions: MergeOptions, files) | 静态合并:构建一个包含 files 中所有页面的新 Document,然后应用 mergeOptions。 |
SendTo(device: Devices.DocumentDevice, output: Stream) | 通过设备渲染此文档到输出 — 委托给 Stream)。 |
SendTo(device: Devices.DocumentDevice, outputFileName: string) | 对 DocumentDevice 的文件重载,Stream)。 |
SendTo(device: Devices.DocumentDevice, fromPage: int, toPage: int, output: Stream) | 渲染页面范围 — 委托给设备的 page-range Process 重载。 |
SendTo(device: Devices.DocumentDevice, fromPage: int, toPage: int, outputFileName: string) | 文件对 page-range 重载。 |
Convert(fixup: Fixup, outputLog: Stream, onlyValidation: bool, parameters) | 运行预定义的 fixup 操作。 |
Convert(fixup: Fixup, outputLog: string, onlyValidation: bool, parameters) | Convert(Fixup, Stream, bool, object[]) 的文件日志重载。 |
Convert(fixup: Fixup, outputLog: string) | 应用 fixup 并将日志写入 outputLog(普通的、非验证情况)。 |
Convert(srcFileName: string, loadOptions: LoadOptions, dstFileName: string, saveOptions: SaveOptions) | 通过 load-options 层次结构打开 srcFileName(HtmlLoadOptions / SvgLoadOptions / MdLoadOptions 都派生自 LoadOptions),并保存到 dstFileName。 |
Convert(srcFileName: string, loadOptions: LoadOptions, dstStream: Stream, saveOptions: SaveOptions) | 在此 Document 实例上调用 Convert(srcFileName, loadOptions, dstStream, saveOptions)。 |
Convert(srcStream: Stream, loadOptions: LoadOptions, dstFileName: string, saveOptions: SaveOptions) | 在此 Document 实例上调用 Convert(srcStream, loadOptions, dstFileName, saveOptions)。 |
Convert(srcStream: Stream, loadOptions: LoadOptions, dstStream: Stream, saveOptions: SaveOptions) | 在此 Document 实例上调用 Convert(srcStream, loadOptions, dstStream, saveOptions)。 |
Encrypt(userPassword: string, ownerPassword: string, permissions: DocumentPrivilege?, algorithm: CryptoAlgorithm) | 使用指定的算法、密码和权限对文档进行加密。 |
Encrypt(userPassword: string, ownerPassword: string, privileges: DocumentPrivilege?, cryptoAlgorithm: CryptoAlgorithm, usePdf20: bool) | Encrypt 重载接受显式的 usePdf20 标志。 |
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm, usePdf20: bool) | Encrypt 重载接受 Permissions 标志枚举以及显式的 usePdf20 标志。 |
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm) | Encrypt 重载接受旧版 Permissions 标志枚举。 |
ChangePasswords(ownerPassword: string, newUserPassword: string, newOwnerPassword: string) | 更改已绑定文档的密码。 |
Decrypt() | 从文档中移除加密。 |
Optimize() | 通过删除未使用的对象和去重流来优化文档资源。 |
ProcessParagraphs() | 处理文档中的段落(保存前的布局步骤)。 |
OptimizeResources() | 在此 Document 实例上调用 OptimizeResources。 |
OptimizeResources(strategy: Aspose.Pdf.Optimization.OptimizationOptions) | 在此 Document 实例上调用 OptimizeResources(strategy)。 |
Convert(options: PdfFormatConversionOptions) | 将文档转换为指定的 PDF/A 合规级别。 |
Convert(outputLogFileName: string, format: PdfFormat, action: ConvertErrorAction) | 将文档转换为特定的 PDF/A 格式,并生成日志文件。 |
Convert(outputLogFileName: string, format: PdfFormat, action: ConvertErrorAction, transparencyAction: ConvertTransparencyAction) | 将文档转换为特定的 PDF/A 格式,并生成日志文件,指定透明度处理方式。 |
Convert(outputLogStream: Stream, format: PdfFormat, action: ConvertErrorAction) | 将文档转换为特定的 PDF/A 格式,并使用日志流。 |
Convert(outputLogStream: Stream, format: PdfFormat, action: ConvertErrorAction, transparencyAction: ConvertTransparencyAction) | 流日志过载并伴随显式透明操作。 |
RemovePdfaCompliance() | 从 XMP 元数据中删除 PDF/A 合规标识。 |
Save() | 就地保存文档:将文档写回其打开的文件(FileName),或在文档是从可写的 FileStream 打开时,对原始源流执行增量保存。 |
ToArray() | 将文档序列化为新的字节数组。 |
Encrypt(userPassword: string, ownerPassword: string, privileges: Facades.DocumentPrivilege, customHandler: Security.ICustomSecurityHandler) | 使用自定义安全处理程序进行加密,该程序提供 /O 和 U 值、文件密钥以及每个对象的密码,取代标准处理程序。 |
Encrypt(userPassword: string, ownerPassword: string, permissions: Aspose.Pdf.Permissions, customHandler: Security.ICustomSecurityHandler) | 同上 — Permissions-typed overload. |
Encrypt(permissions: Aspose.Pdf.Permissions, cryptoAlgorithm: CryptoAlgorithm, publicCertificates: System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2>) | 使用收件人公共证书列表进行加密(Public-Key /Filter security handler)。 |
Save(outputFileName: string) | 将文档保存到文件。 |
Save(outputFileName: string, format: SaveFormat) | 将文档保存为指定格式的文件。 |
Save(outputStream: Stream, format: SaveFormat) | 将文档保存为指定格式的流。 |
Save(output: Stream, options: HtmlSaveOptions) | 将文档以 HTML 形式保存到流中,使用指定的选项。 |
Save(path: string, options: HtmlSaveOptions) | 将文档以 HTML 形式保存到文件中,使用指定的选项。 |
Save(outputStream: Stream, options: SaveOptions) | 使用通用的 SaveOptions 将其保存到流(存根类型来自 Aspose.Pdf 命名空间)。 |
Save(outputFileName: string, options: SaveOptions) | 使用通用的 SaveOptions 将其保存到文件(存根类型来自 Aspose.Pdf 命名空间)。 |
Save(options: SaveOptions) | 使用已配置的 SaveOptions 保存文档。 |
SaveAsync(cancellationToken: System.Threading.CancellationToken) | 围绕 Save() 的异步包装器。 |
SaveAsync(options: SaveOptions, cancellationToken: System.Threading.CancellationToken) | Save(SaveOptions) 的异步包装器。 |
SaveAsync(output: Stream, cancellationToken: System.Threading.CancellationToken) | 对 Save(Stream) 的异步包装。 |
SaveAsync(outputStream: Stream, format: SaveFormat, cancellationToken: System.Threading.CancellationToken) | 对 Save(Stream, SaveFormat) 的异步包装。 |
SaveAsync(outputStream: Stream, options: SaveOptions, cancellationToken: System.Threading.CancellationToken) | 对 Save(Stream, SaveOptions) 的异步包装。 |
SaveAsync(outputFileName: string, cancellationToken: System.Threading.CancellationToken) | 对 Save(string) 的异步包装。 |
SaveAsync(outputFileName: string, format: SaveFormat, cancellationToken: System.Threading.CancellationToken) | 对 Save(string, SaveFormat) 的异步包装。 |
SaveAsync(outputFileName: string, options: SaveOptions, cancellationToken: System.Threading.CancellationToken) | 对 Save(string, SaveOptions) 的异步包装。 |
Save(output: Stream) | 将文档保存到流中。 |
SetDefaultFileSizeLimitToMemoryLoading() | 将 FileSizeLimitToMemoryLoading 重置为其内置默认值。 |
SetTitle(title: string) | 更新 /Info /Title 条目。 |
PageNodesToBalancedTree(nodesNumInSubtrees: byte) | 重新构建页面树,使每个子树拥有 nodesNumInSubtrees 个子节点。 |
RemoveMetadata() | 删除所有元数据。 |
RemovePdfUaCompliance() | 删除 PDF/UA 合规标记。 |
FlattenTransparency() | 将透明度展平为不透明图形。 |
SplitSharedImages(pages) | 为每个传入的页面提供它们共享的图像 XObjects 的私有副本,以便通过其中一个页面进行的就地编辑(例如…)。 |
Repair(options: RepairOptions) | 执行请求的修复遍。 |
GetObjectById(id: string) | 通过字符串 ID 解析 PDF 对象。 |
ExportAnnotationsToXfdf(stream: Stream) | 将文档中的所有批注导出为 XFDF 流。 |
ExportAnnotationsToXfdf(fileName: string) | 将文档中的所有批注导出为 XFDF 文件。 |
ImportAnnotationsFromXfdf(stream: Stream) | 从 XFDF 流导入批注到文档。 |
ImportAnnotationsFromXfdf(fileName: string) | 从 XFDF 文件导入批注到文档。 |
GetXmpMetadata(stream: Stream) | 将文档的 XMP /Metadata 包写入流。 |
SetXmpMetadata(stream: Stream) | 从流中替换文档的 XMP /Metadata 包。 |
ConvertPageToPNGMemoryStream(page: Page) | 将单页转换为 PNG 内存流。 |
SaveXml(file: string) | 将文档保存为 XML(Aspose-Pdf XML 架构)。 |
Check(doRepair: bool) | 验证 / 修复文档。 |
Check(doRepair: bool, output: System.IO.Stream) | 验证文档的页面内容流,并将任何问题写入 XML 报告到输出。 |
LoadFrom(filename: string, options: LoadOptions) | 异步文件加载包装器(当前为同步)。 |
Document(filename: string, isManagedStream: bool) | 单参数 ctor,其参数保持已设定的文件名。 |
Document(input: Stream, isManagedStream: bool) | 带有 managed-stream 标志的流 ctor。 |
Document(input: Stream, password: string, isManagedStream: bool) | Stream ctor 带密码 + managed-stream 标志。 |
Document(filename: string, password: string, isManagedStream: bool) | File ctor 带密码 + managed-stream 标志。 |
Document(input: Stream, password: string, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler) | Stream ctor 带密码 + ICustomSecurityHandler。 |
Document(input: Stream, password: string, isManagedStream: bool, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler) | Stream ctor 带密码 + managed-stream + ICustomSecurityHandler。 |
Document(filename: string, password: string, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler) | File ctor with password + ICustomSecurityHandler。 |
Document(filename: string, password: string, isManagedStream: bool, customSecurityHandler: Aspose.Pdf.Security.ICustomSecurityHandler) | File ctor with password + managed-stream + ICustomSecurityHandler。 |
Document(input: Stream, options: LoadOptions) | Stream ctor with LoadOptions。 |
Document(filename: string, options: LoadOptions) | File ctor with LoadOptions — 与流重载具有相同的运行时分派。 |
FreeMemory() | 清除内存。 |