StructElement
StructElement
ภาพรวม
StructElement เป็นคลาสใน Aspose.PDF FOSS สำหรับ TypeScript.
โหนดในโครงสร้างต้นไม้: ตัวจัดการแบบเรียลไทม์เหนือพจนานุกรมจริงของ /StructElem.
คลาสนี้ประกาศ 10 เมธอดสำหรับอ็อบเจ็กต์ StructElement ในโปรแกรม TypeScript. เมธอดที่มีรวมถึง: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้จากแอปพลิเคชัน TypeScript ใดก็ได้หลังจากติดตั้งแพ็กเกจ Aspose.PDF FOSS สำหรับ TypeScript. คุณสมบัติ: A, ActualText, Alt, Attributes, C, Children, และอีก 17 รายการ.
คุณสมบัติ
| ชื่อ | ประเภท | การเข้าถึง | คำอธิบาย |
|---|---|---|---|
Type | string | อ่าน | รับค่าชนิด. |
StandardType | string | อ่าน | รับประเภทมาตรฐาน. |
IsStandardType | boolean | อ่าน | รับค่า is standard type. |
Parent | `StructElement | undefined` | อ่าน |
Children | StructElement[] | อ่าน | รับคอลเลกชันของลูก. |
Title | `string | undefined` | อ่าน/เขียน |
Alt | `string | undefined` | อ่าน/เขียน |
ActualText | `string | undefined` | อ่าน/เขียน |
Expansion | `string | undefined` | อ่าน/เขียน |
ID | `string | undefined` | อ่าน/เขียน |
Lang | `string | undefined` | อ่าน/เขียน |
EffectiveLang | `string | undefined` | อ่าน |
Page | `Page | undefined` | อ่าน |
Attributes | { A: PdfObject[]; C: PdfObject[] } | อ่าน | ดึงคุณลักษณะ. |
A | : PdfObject[] | อ่าน | รับค่า a. |
C | : PdfObject[] | อ่าน | รับค่า c. |
ContentItems | ContentItem[] | อ่าน | รับรายการเนื้อหา. |
Nodes | StructNode[] | อ่าน | รับโหนด. |
g | : GlyphEvent | อ่าน | รับค่า g. |
at | : number | อ่าน | ดึงค่า at. |
TableAttributes | `TableAttributes | undefined` | อ่าน |
ListAttributes | `ListAttributes | undefined` | อ่าน |
LayoutAttributes | `LayoutAttributes | undefined` | อ่าน |
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined, Root: StructTreeRoot)` |
GetText(skip: (e: StructElement) => boolean) → string | ข้อความขององค์ประกอบนี้และของลูกหลานของมัน ตามลำดับ /K (การอ่าน). |
GetBBox(page: Page) → `[number, number, number, number] | undefined` |
Append(type: string, opts: ElemOpts) → StructElement | สร้างองค์ประกอบโครงสร้างลูกของ type ใต้รายการนี้; คืนค่า handle ของมัน. |
NextMcid(page: Page) → number | จัดสรร MCID ถัดไปสำหรับ page กับองค์ประกอบนี้และเชื่อมต่อ /ParentTree + /K. |
MarkContent(page: Page, region: Rect) → number | ทำแท็กเนื้อหาหน้าที่มีอยู่ภายใต้รายการนี้: จัดสรร MCID และห่อหุ้มการดำเนินการระดับบนสุด show/Do ที่เนื้อหาอยู่ใน region ด้วย /<Type> <</MCID n>> BDC … EMC. |
AddAnnotation(annotation: Annotation) | ทำแท็กคำอธิบาย (เช่น. |
SetTableAttributes(attrs: Partial<TableAttributes>) | ผสานคุณลักษณะของตารางเข้ากับ /A ขององค์ประกอบนี้ (ฟิลด์ที่ตั้งค่าเป็น undefined จะลบคีย์นั้น). |
SetListAttributes(attrs: Partial<ListAttributes>) | ผสานคุณลักษณะของรายการเข้ากับ /A ขององค์ประกอบนี้. |
SetLayoutAttributes(attrs: Partial<LayoutAttributes>) | ผสานคุณลักษณะของเค้าโครงเข้ากับ /A ขององค์ประกอบนี้. |