StructElement

StructElement

Przegląd

StructElement jest klasą w Aspose.PDF FOSS dla TypeScript.

Węzeł w drzewie struktury: aktywne odwołanie do jego rzeczywistego słownika /StructElem.

Ta klasa deklaruje 10 metod dla obiektów StructElement w programach TypeScript. Dostępne metody to: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. Wszystkie publiczne elementy są dostępne dla każdej aplikacji TypeScript po zainstalowaniu pakietu Aspose.PDF FOSS dla TypeScript. Właściwości: A, ActualText, Alt, Attributes, C, Children oraz 17 kolejnych.

Właściwości

NazwaTypDostępOpis
TypestringOdczytPobiera typ.
StandardTypestringOdczytPobiera standardowy typ.
IsStandardTypebooleanOdczytPobiera standardowy typ.
Parent`StructElementundefined`Odczyt
ChildrenStructElement[]OdczytZwraca dzieci.
Title`stringundefined`Odczyt/zapis
Alt`stringundefined`Odczyt/zapis
ActualText`stringundefined`Odczyt/zapis
Expansion`stringundefined`Odczyt/zapis
ID`stringundefined`Odczyt/zapis
Lang`stringundefined`Odczyt/zapis
EffectiveLang`stringundefined`Odczyt
Page`Pageundefined`Odczyt
Attributes{ A: PdfObject[]; C: PdfObject[] }OdczytPobiera atrybuty.
A: PdfObject[]OdczytPobiera a.
C: PdfObject[]OdczytPobiera c.
ContentItemsContentItem[]OdczytPobiera elementy treści.
NodesStructNode[]OdczytPobiera węzły.
g: GlyphEventOdczytPobiera g.
at: numberOdczytPobiera at.
TableAttributes`TableAttributesundefined`Odczyt
ListAttributes`ListAttributesundefined`Odczyt
LayoutAttributes`LayoutAttributesundefined`Odczyt

Metody

SygnaturaOpis
`constructor(doc: Document, Dict: PdfDict, Ref: PdfRefundefined, Root: StructTreeRoot)`
GetText(skip: (e: StructElement) => boolean) → stringTekst tego elementu oraz jego potomków, w kolejności /K (odczytu).
GetBBox(page: Page) → `[number, number, number, number]undefined`
Append(type: string, opts: ElemOpts) → StructElementUtwórz element struktury potomny type pod tym; zwraca jego uchwyt.
NextMcid(page: Page) → numberPrzydziel kolejny MCID dla page względem tego elementu i podłącz /ParentTree + /K.
MarkContent(page: Page, region: Rect) → numberOtaguj istniejącą treść strony pod tym elementem: przydziel MCID i otocz operacje top-level show/Do, których treść mieści się w region, w /<Type> <</MCID n>> BDC … EMC.
AddAnnotation(annotation: Annotation)Otaguj adnotację (np.
SetTableAttributes(attrs: Partial<TableAttributes>)Scalisz atrybuty tabeli do /A tego elementu (pole ustawione na undefined usuwa ten klucz).
SetListAttributes(attrs: Partial<ListAttributes>)Scalisz atrybuty listy do /A tego elementu.
SetLayoutAttributes(attrs: Partial<LayoutAttributes>)Scalisz atrybuty układu do /A tego elementu.
 Polski