TableElement
概述
TableElement 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:StructureElement。
该类为在 .NET 程序中处理 TableElement 对象提供了 15 个方法。可用的方法包括:AdjustPosition、AppendChild、ChangeParentElement、ClearId、CreateTBody、CreateTFoot、CreateTHead、Detach、FindElements、RemoveAndMoveItsChildObjectsToItsParent、SetId、SetTag,以及另外 2 个方法。安装 Aspose.PDF FOSS for .NET 软件包后,所有公共成员对任何 .NET 应用程序均可访问。属性有:ActualText、Alignment、AlternativeText、Attributes、BackgroundColor、Border,以及另外 25 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
RepeatingRowsCount | int | 读写 | 获取或设置重复行的计数。 |
RepeatingColumnsCount | int | 读写 | 获取或设置重复列的计数。 |
RepeatingRowsStyle | Aspose.Pdf.Text.TextState? | 读写 | 获取或设置重复行样式。 |
BackgroundColor | Aspose.Pdf.Color? | 读写 | 获取或设置背景颜色。 |
Border | Aspose.Pdf.BorderInfo? | 读写 | 获取或设置边框。 |
Alignment | Aspose.Pdf.HorizontalAlignment | 读写 | 获取或设置对齐方式。 |
CornerStyle | Aspose.Pdf.BorderCornerStyle | 读写 | 获取或设置角落样式。 |
Broken | Aspose.Pdf.TableBroken | 读写 | 获取或设置 broken。 |
ColumnAdjustment | Aspose.Pdf.ColumnAdjustment | 读写 | 获取或设置列调整。 |
ColumnWidths | string? | 读写 | 获取或设置列宽。 |
DefaultColumnWidth | string? | 读写 | 获取或设置默认列宽。 |
DefaultCellBorder | Aspose.Pdf.BorderInfo? | 读写 | 获取或设置默认单元格边框。 |
DefaultCellPadding | Aspose.Pdf.MarginInfo? | 读写 | 获取或设置默认单元格填充。 |
DefaultCellTextState | Aspose.Pdf.Text.TextState | 读写 | 获取或设置默认单元格文本状态。 |
IsBroken | bool | 读写 | 获取或设置是否已损坏。 |
IsBordersIncluded | bool | 读写 | 获取或设置是否包含边框。 |
Left | float | 读写 | 获取或设置左侧。 |
Top | float | 读写 | 获取或设置 top。 |
StructureTextState | StructureTextState | 读取 | 文本状态已应用于此元素的内联内容(仅存储——FOSS 结构构建器不会重新渲染它)。 |
Attributes | StructureElementAttributes | 读取 | 附加到此元素的结构属性 (/A),按所有者组织。 |
StructureType | string | 读取 | PDF 的结构类型角色 (/S 条目,例如. |
S | StructureType | 读取 | 元素的结构类型 (/S) 作为一个 StructureType,其 Name 为角色标签(例如. |
ActualText | string | 读写 | 标记内容的替换文本(/ActualText)。 |
AlternativeText | string | 读写 | 辅助技术使用的替代文本(/Alt)。 |
ExpansionText | string | 读写 | 缩写的展开文本(/E)。 |
Language | string | 读写 | BCP-47 语言代码,用于元素的内容 (/Lang)。 |
ID | string | 读取 | 元素标识符 (/ID);只读 — 在保存时分配。 |
Title | string | 读写 | 结构元素的标题 (/T)。 |
Page | Page? | 读取 | 承载此元素内容的页面,或在该元素尚未附加到页面时为 null。 |
ParentElement | StructureElement? | 读取 | 父结构元素,或在该元素已分离或直接位于结构树根部时为 null。 |
ChildElements | ElementList | 读取 | 此元素的直接子元素。 |
方法
| 签名 | 描述 |
|---|---|
CreateTBody() | 创建并追加一个 TBody 子元素。 |
CreateTHead() | 创建并追加一个 THead 子元素。 |
CreateTFoot() | 创建并追加一个 TFoot 子元素。 |
AppendChild(child: StructureElement) | 在此元素的 /K 数组下追加子元素。 |
SetTag(tag: string) | 将此元素的角色重新映射为自定义标签,在文档角色映射中将标签 → 其标准类型进行注册。 |
ToString() | 在转储结构树时使用的文本表示(角色名称;若不存在则回退到类型名称)。 |
FindElements(recursive: bool) | 递归查找类型为 T 的后代元素。 |
AppendChild(child: StructureElement, validate: bool) | 追加子元素,可选地进行一次验证。 |
SetText(text: string) | 设置元素的文本内容(存储为 ActualText)。 |
SetId(id: string) | 设置元素标识符 (/ID)。 |
ClearId() | 删除元素标识符 (/ID)。 |
AdjustPosition(settings: object) | 捕获为已编写结构元素请求的布局位置。 |
ChangeParentElement(newParent: StructureElement, validate: bool) | 将此元素移动到 newParent 下。 |
RemoveAndMoveItsChildObjectsToItsParent(validate: bool) | 将此元素分离,然后将其子元素重新归属到该元素原来的父元素下(占据此元素的槽位)。 |
Detach() | 将此元素从其父元素中分离。 |