StructElement
Visión general
StructElement es una clase en Aspose.PDF FOSS para TypeScript.
Un nodo en el árbol de estructura: un manejador activo sobre su diccionario real /StructElem.
Esta clase declara 10 métodos para objetos StructElement en programas TypeScript. Los métodos disponibles incluyen: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. Todos los miembros públicos son accesibles a cualquier aplicación TypeScript después de instalar el paquete Aspose.PDF FOSS para TypeScript. Propiedades: A, ActualText, Alt, Attributes, C, Children, y 17 más.
Propiedades
| Nombre | Tipo | Acceso | Descripción |
|---|---|---|---|
Type | string | Lectura | Obtiene el tipo. |
StandardType | string | Lectura | Obtiene el tipo estándar. |
IsStandardType | boolean | Lectura | Obtiene el tipo estándar. |
Parent | `StructElement | undefined` | Lectura |
Children | StructElement[] | Lectura | Obtiene los hijos. |
Title | `string | undefined` | Lectura/Escritura |
Alt | `string | undefined` | Lectura/Escritura |
ActualText | `string | undefined` | Lectura/Escritura |
Expansion | `string | undefined` | Lectura/Escritura |
ID | `string | undefined` | Lectura/Escritura |
Lang | `string | undefined` | Lectura/Escritura |
EffectiveLang | `string | undefined` | Lectura |
Page | `Page | undefined` | Lectura |
Attributes | { A: PdfObject[]; C: PdfObject[] } | Lectura | Obtiene los atributos. |
A | : PdfObject[] | Lectura | Obtiene el a. |
C | : PdfObject[] | Lectura | Obtiene la c. |
ContentItems | ContentItem[] | Lectura | Obtiene los elementos de contenido. |
Nodes | StructNode[] | Lectura | Obtiene los nodos. |
g | : GlyphEvent | Lectura | Obtiene el g. |
at | : number | Lectura | Obtiene el at. |
TableAttributes | `TableAttributes | undefined` | Lectura |
ListAttributes | `ListAttributes | undefined` | Lectura |
LayoutAttributes | `LayoutAttributes | undefined` | Lectura |
Métodos
| Firma | Descripción |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined, Root: StructTreeRoot)` |
GetText(skip: (e: StructElement) => boolean) → string | El texto de este elemento y el de sus descendientes, en orden /K (de lectura). |
GetBBox(page: Page) → `[number, number, number, number] | undefined` |
Append(type: string, opts: ElemOpts) → StructElement | Crea un elemento de estructura hijo de type bajo este; devuelve su manejador. |
NextMcid(page: Page) → number | Asigna el siguiente MCID para page a este elemento y conecta el /ParentTree + /K. |
MarkContent(page: Page, region: Rect) → number | Etiqueta el contenido de página existente bajo este elemento: asigna un MCID y envuelve las operaciones show/Do de nivel superior cuyo contenido cae en region en /<Type> <</MCID n>> BDC … EMC. |
AddAnnotation(annotation: Annotation) | Etiqueta una anotación (p. ej. |
SetTableAttributes(attrs: Partial<TableAttributes>) | Combinar los atributos de tabla en el /A de este elemento (un campo establecido en undefined elimina esa clave). |
SetListAttributes(attrs: Partial<ListAttributes>) | Combinar los atributos de lista en el /A de este elemento. |
SetLayoutAttributes(attrs: Partial<LayoutAttributes>) | Combinar los atributos de diseño en el /A de este elemento. |