NamedDestination
概述
NamedDestination 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:Aspose.Pdf.Annotations.IAppointment。
表示文档中的命名目标 (PDF32000 §12.3.2.3)。
此类提供 8 个方法,用于在 .NET 程序中处理 NamedDestination 对象。可用的方法包括:CreateFitDestination、CreateFitHDestination、CreateFitRDestination、CreateFitVDestination、CreateXYZDestination、NamedDestination、ToString。在安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Bottom、Left、Name、PageIndex、PageNumber、Right,以及另外 3 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Name | string | 读取 | 目标名称。 |
PageIndex | int | 读取 | 目标页面索引(从0开始),如果未解析则为 -1。 |
PageNumber | int | 读取 | 目标页码(从 1 开始),如果未解析则为 0。 |
Type | string | 读取 | 目标类型(“Fit”, “XYZ”, “FitH”, 等)。 |
Left | double? | 读取 | 左坐标(针对 XYZ,FitV、FitR、FitBV),或 null。 |
Top | double? | 读取 | 顶部坐标(针对 XYZ,FitH、FitR、FitBH),或 null. |
Right | double? | 读取 | 右坐标(仅适用于 FitR),或 null. |
Bottom | double? | 读取 | 底部坐标(仅适用于 FitR),或 null. |
Zoom | double? | 读取 | 缩放因子(仅适用于 XYZ;null = 继承当前值)。 |
方法
| 签名 | 描述 |
|---|---|
NamedDestination(name: string) | 创建一个具名目标引用(仅名称,目标细节稍后解析)。 |
NamedDestination(document: Document, name: string) | 创建一个限定于文档的具名目标引用。 |
CreateFitDestination(pageIndex: int) | 创建一个 /Fit 目标:将页面缩放以完全适应窗口。 |
CreateFitHDestination(pageIndex: int, top: double) | 创建一个 /FitH 目标:将页面的垂直位置 top 显示在窗口顶部,并将放大比例设置为适合宽度。 |
CreateFitVDestination(pageIndex: int, left: double) | 创建一个 /FitV 目标:将页面的水平位置 left 显示在窗口左侧,并将放大比例设置为适合高度。 |
CreateXYZDestination(pageIndex: int, left: double, top: double, zoom: double) | 创建一个 /XYZ 目标:在位置 (left, top) 处显示页面,使用缩放因子 zoom。 |
CreateFitRDestination(pageIndex: int, left: double, bottom: double, right: double, top: double) | 创建一个 /FitR 目标:显示页面,缩放以适应由 (left, bottom, right, top) 指定的矩形。 |
ToString() | 此约定目标的可读表示。 |