可用于:用户界面的ASP。NET MVC | 用户界面的ASP。净AJAX | Blazor用户界面 | WPF的用户界面 | WinForms的UI | Silverlight的用户界面 | Xamarin的UI | WinUI的用户界面 | 用户界面的ASP。网络核心 | .NET MAUI的用户界面

Telerik文档处理?下载30天免费试用

RadFixedDocument

RadFixedDocument承载固定的文档内容,是文档元素树中的根元素。的集合RadFixedPage元素。

本文将使您熟悉的基础知识RadFixedDocument.它包括以下各节:

什么是RadFixedDocument

RadFixedDocument对象中包含所有其他元素的根元素RadPdfProcessing模型。它公开了以下属性:

  • 页面:包含所有的页面集合RadFixedPages在文档中。
  • 注释:包含所有的只读集合注释在文档中。
  • 目的地:包含所有的集合目的地在文档中。
  • DocumentInfo:包含关于文档的额外元信息,如作者、标题等。

示例1说明如何创建一个新的RadFixedDocument实例。

例1:创建RadFixedDocument

RadFixedDocument document = new RadFixedDocument();

使用RadFixedDocument操作

有不同的操作,您可以在的帮助下执行RadFixedDocument.例如,您可以添加一个RadFixedPage到现有文档。

示例2中创建的文档中添加页面示例1

例2:向RadFixedDocument添加页面

RadFixedPage page = document.Pages.AddPage();

或者,您可以创建新的RadFixedPage把它加到页面文件的收集。

示例3创建页面并将其添加到中创建的文档中示例1

例3:创建并添加一个页面到RadFixedDocument

RadFixedPage page = new RadFixedPage();document.Pages.Add(页面);
示例4向您展示如何获得RadFixedDocument的副本。

例4:克隆文档

RadFixedDocument克隆文档= originalDocument.Clone();

的merge()方法可以立即合并PDF文档RadFixedDocument.的当前实例中添加源文档RadFixedDocument

例5:合并文档

document.Merge(源);
来自的代码示例5中创建的文档合并示例1与另一个RadFixedDocument

文档信息

RadFixedDocument公开了一个DocumentInfo类型属性RadFixedDocumentInfo,用于保存关于文档的附加信息。的RadFixedDocumentInfo类允许设置以下属性:

  • 作者:文档的作者。
  • 标题:文档的标题。
  • 描述:描述文档内容的文本。

例6:设置DocumentInfo

document.DocumentInfo.Author = "Jane Doe";document.DocumentInfo.Title = "RadFixedDocument";document. documentinfo . description = "本文档旨在解释RadPdfProcessing库中的RadFixedDocument类";

目前DocumentInfo属性仅用于导出,在导入时将删除关于文档的元信息。

另请参阅

在本文中
Baidu
map