StructElement
개요
StructElement은 Aspose.PDF FOSS의 TypeScript용 클래스입니다.
구조 트리의 노드: 실제 /StructElem 사전에 대한 실시간 핸들.
이 클래스는 TypeScript 프로그램에서 StructElement 객체를 위해 10개의 메서드를 선언합니다. 사용 가능한 메서드에는: AddAnnotation, Append, GetBBox, GetText, MarkContent, NextMcid, SetLayoutAttributes, SetListAttributes, SetTableAttributes, constructor가 포함됩니다. 모든 public 멤버는 Aspose.PDF FOSS for TypeScript 패키지를 설치한 후 any TypeScript 애플리케이션에서 접근할 수 있습니다. 속성: A, ActualText, Alt, Attributes, C, Children, 및 17개 더.
속성
| 이름 | 유형 | 액세스 | 설명 |
|---|---|---|---|
Type | string | 읽기 | 형식을 가져옵니다. |
StandardType | string | 읽기 | 표준 유형을 가져옵니다. |
IsStandardType | boolean | 읽기 | 표준 타입인지 가져옵니다. |
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의 하위 구조 요소를 이 요소 아래에 생성합니다; 핸들을 반환합니다. |
NextMcid(page: Page) → number | page에 대한 다음 MCID를 이 요소에 할당하고 /ParentTree + /K를 연결합니다. |
MarkContent(page: Page, region: Rect) → number | 이 요소 아래의 기존 페이지 콘텐츠에 태그를 지정합니다: MCID를 할당하고 top-level 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에 병합합니다. |