StructElement
StructElement
Visão geral
StructElement é uma classe em Aspose.PDF FOSS para TypeScript.
Um nó na árvore de estrutura: um manipulador ao vivo sobre seu dicionário real /StructElem.
Esta classe declara 10 métodos para objetos StructElement em programas TypeScript. Métodos disponíveis incluem: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. Todos os membros públicos são acessíveis a qualquer aplicação TypeScript após a instalação do pacote Aspose.PDF FOSS para TypeScript. Propriedades: A, ActualText, Alt, Attributes, C, Children, e mais 17.
Propriedades
| Nome | Tipo | Acesso | Descrição |
|---|---|---|---|
Type | string | Leitura | Obtém o tipo. |
StandardType | string | Leitura | Obtém o tipo padrão. |
IsStandardType | boolean | Leitura | Obtém o tipo padrão. |
Parent | `StructElement | undefined` | Leitura |
Children | StructElement[] | Leitura | Obtém os filhos. |
Title | `string | undefined` | Leitura/Escrita |
Alt | `string | undefined` | Leitura/Escrita |
ActualText | `string | undefined` | Leitura/Escrita |
Expansion | `string | undefined` | Leitura/Escrita |
ID | `string | undefined` | Leitura/Escrita |
Lang | `string | undefined` | Leitura/Escrita |
EffectiveLang | `string | undefined` | Leitura |
Page | `Page | undefined` | Leitura |
Attributes | { A: PdfObject[]; C: PdfObject[] } | Leitura | Obtém os atributos. |
A | : PdfObject[] | Leitura | Obtém o a. |
C | : PdfObject[] | Leitura | Obtém o c. |
ContentItems | ContentItem[] | Leitura | Obtém os itens de conteúdo. |
Nodes | StructNode[] | Leitura | Obtém os nós. |
g | : GlyphEvent | Leitura | Obtém o g. |
at | : number | Leitura | Obtém o at. |
TableAttributes | `TableAttributes | undefined` | Leitura |
ListAttributes | `ListAttributes | undefined` | Leitura |
LayoutAttributes | `LayoutAttributes | undefined` | Leitura |
Métodos
| Assinatura | Descrição |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined, Root: StructTreeRoot)` |
GetText(skip: (e: StructElement) => boolean) → string | O texto deste elemento e de seus descendentes, na ordem /K (de leitura). |
GetBBox(page: Page) → `[number, number, number, number] | undefined` |
Append(type: string, opts: ElemOpts) → StructElement | Crie um elemento de estrutura filho de type sob este; retorna seu identificador. |
NextMcid(page: Page) → number | Alocar o próximo MCID para page neste elemento e conectar o /ParentTree + /K. |
MarkContent(page: Page, region: Rect) → number | Marcar o conteúdo da página existente sob este elemento: aloque um MCID e envolva as operações de nível superior show/Do cujo conteúdo se encontra em region em /<Type> <</MCID n>> BDC … EMC. |
AddAnnotation(annotation: Annotation) | Marcar uma anotação (por exemplo, |
SetTableAttributes(attrs: Partial<TableAttributes>) | Mesclar atributos da tabela no /A deste elemento (um campo definido como undefined exclui essa chave). |
SetListAttributes(attrs: Partial<ListAttributes>) | Mesclar atributos da lista no /A deste elemento. |
SetLayoutAttributes(attrs: Partial<LayoutAttributes>) | Mesclar atributos de layout no /A deste elemento. |