StructElement
Přehled
StructElement je třída v Aspose.PDF FOSS pro TypeScript.
Uzel ve stromu struktury: živý odkaz na jeho skutečný /StructElem slovník.
Tato třída deklaruje 10 metod pro objekty StructElement v programech TypeScript. Dostupné metody zahrnují: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. Všichni veřejní členové jsou přístupní jakékoli aplikaci TypeScript po instalaci balíčku Aspose.PDF FOSS pro TypeScript. Vlastnosti: A, ActualText, Alt, Attributes, C, Children a dalších 17.
Vlastnosti
| Název: | Typ: | Přístup | Popis: |
|---|---|---|---|
Type | string | Čtení | Získá typ. |
StandardType | string | Čtení | Získá standardní typ. |
IsStandardType | boolean | Čtení | Získá typ is standard. |
Parent | `StructElement | undefined` | Čtení |
Children | StructElement[] | Čtení | Získá potomky. |
Title | `string | undefined` | Čtení/zápis |
Alt | `string | undefined` | Čtení/zápis |
ActualText | `string | undefined` | Čtení/zápis |
Expansion | `string | undefined` | Čtení/zápis |
ID | `string | undefined` | Čtení/zápis |
Lang | `string | undefined` | Čtení/zápis |
EffectiveLang | `string | undefined` | Čtení |
Page | `Page | undefined` | Čtení |
Attributes | { A: PdfObject[]; C: PdfObject[] } | Čtení | Získá atributy. |
A | : PdfObject[] | Čtení | Získá a. |
C | : PdfObject[] | Čtení | Získá c. |
ContentItems | ContentItem[] | Čtení | Získá položky obsahu. |
Nodes | StructNode[] | Čtení | Získá uzly. |
g | : GlyphEvent | Čtení | Získá g. |
at | : number | Čtení | Získá at. |
TableAttributes | `TableAttributes | undefined` | Čtení |
ListAttributes | `ListAttributes | undefined` | Čtení |
LayoutAttributes | `LayoutAttributes | undefined` | Čtení |
Metody
| Podpis: | Popis: |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined, Root: StructTreeRoot)` |
GetText(skip: (e: StructElement) => boolean) → string | Text tohoto elementu a jeho potomků, v pořadí /K (čtení). |
GetBBox(page: Page) → `[number, number, number, number] | undefined` |
Append(type: string, opts: ElemOpts) → StructElement | Vytvořte podřízený strukturální prvek type pod tímto; vrátí jeho handle. |
NextMcid(page: Page) → number | Přiřaďte další MCID pro page k tomuto prvku a propojte /ParentTree + /K. |
MarkContent(page: Page, region: Rect) → number | Označte existující obsah stránky pod tímto prvkem: přiřaďte MCID a zabalte operace top-level show/Do, jejichž obsah spadá do region, do /<Type> <</MCID n>> BDC … EMC. |
AddAnnotation(annotation: Annotation) | Označte anotaci (např. |
SetTableAttributes(attrs: Partial<TableAttributes>) | Sloučte atributy tabulky do /A tohoto elementu (pole nastavené na undefined smaže tento klíč). |
SetListAttributes(attrs: Partial<ListAttributes>) | Sloučte atributy seznamu do /A tohoto prvku. |
SetLayoutAttributes(attrs: Partial<LayoutAttributes>) | Sloučte atributy rozvržení do /A tohoto prvku. |