StructElement
StructElement
Panoramica
StructElement è una classe in Aspose.PDF FOSS per TypeScript.
Un nodo nell’albero della struttura: un live handle sul suo reale dizionario /StructElem.
Questa classe dichiara 10 metodi per oggetti StructElement nei programmi TypeScript. I metodi disponibili includono: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. Tutti i membri pubblici sono accessibili a qualsiasi applicazione TypeScript dopo l’installazione del pacchetto Aspose.PDF FOSS per TypeScript. Proprietà: A, ActualText, Alt, Attributes, C, Children, e 17 altri.
Proprietà
| Nome | Tipo | Accesso | Descrizione |
|---|---|---|---|
Type | string | Lettura | Ottiene il tipo. |
StandardType | string | Lettura | Ottiene il tipo standard. |
IsStandardType | boolean | Lettura | Ottiene il tipo standard. |
Parent | `StructElement | undefined` | Lettura |
Children | StructElement[] | Lettura | Ottiene i figli. |
Title | `string | undefined` | Lettura/Scrittura |
Alt | `string | undefined` | Lettura/Scrittura |
ActualText | `string | undefined` | Lettura/Scrittura |
Expansion | `string | undefined` | Lettura/Scrittura |
ID | `string | undefined` | Lettura/Scrittura |
Lang | `string | undefined` | Lettura/Scrittura |
EffectiveLang | `string | undefined` | Lettura |
Page | `Page | undefined` | Lettura |
Attributes | { A: PdfObject[]; C: PdfObject[] } | Lettura | Ottiene gli attributi. |
A | : PdfObject[] | Lettura | Ottiene il a. |
C | : PdfObject[] | Lettura | Ottiene il c. |
ContentItems | ContentItem[] | Lettura | Ottiene gli elementi di contenuto. |
Nodes | StructNode[] | Lettura | Ottiene i nodi. |
g | : GlyphEvent | Lettura | Ottiene il g. |
at | : number | Lettura | Ottiene l’at. |
TableAttributes | `TableAttributes | undefined` | Lettura |
ListAttributes | `ListAttributes | undefined` | Lettura |
LayoutAttributes | `LayoutAttributes | undefined` | Lettura |
Metodi
| Firma | Descrizione |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined, Root: StructTreeRoot)` |
GetText(skip: (e: StructElement) => boolean) → string | Il testo di questo elemento e dei suoi discendenti, nell’ordine /K (di lettura). |
GetBBox(page: Page) → `[number, number, number, number] | undefined` |
Append(type: string, opts: ElemOpts) → StructElement | Crea un elemento di struttura figlio di type sotto questo; restituisce il suo handle. |
NextMcid(page: Page) → number | Assegna il prossimo MCID per page rispetto a questo elemento e collega il /ParentTree + /K. |
MarkContent(page: Page, region: Rect) → number | Etichetta il contenuto della pagina esistente sotto questo elemento: assegna un MCID e avvolgi le operazioni show/Do di livello superiore il cui contenuto ricade in region in /<Type> <</MCID n>> BDC … EMC. |
AddAnnotation(annotation: Annotation) | Etichetta un’annotazione (ad es. |
SetTableAttributes(attrs: Partial<TableAttributes>) | Unisci gli attributi della tabella in /A di questo elemento (un campo impostato su undefined elimina quella chiave). |
SetListAttributes(attrs: Partial<ListAttributes>) | Unisci gli attributi della lista in /A di questo elemento. |
SetLayoutAttributes(attrs: Partial<LayoutAttributes>) | Unisci gli attributi del layout in /A di questo elemento. |