StructTreeRoot
개요
StructTreeRoot은 Aspose.PDF FOSS에서 TypeScript을 위해 제공되는 클래스입니다.
문서의 논리 구조 트리: /StructTreeRoot에 대한 실시간 핸들.
이 클래스는 TypeScript 프로그램의 StructTreeRoot 객체를 위해 7개의 메서드를 선언합니다. 사용 가능한 메서드에는 Append, ElementFor, ElementForObject, GetText, RegisterRole, ResolveRole, constructor가 포함됩니다. 모든 공개 멤버는 Aspose.PDF FOSS for TypeScript 패키지를 설치한 후 모든 TypeScript 애플리케이션에서 접근할 수 있습니다. 속성: Children, ClassMap, RoleMap.
속성
| 이름 | 유형 | 액세스 | 설명 |
|---|---|---|---|
RoleMap | : Map<string, string> | 읽기 | 맞춤 역할 -> 매핑된 역할 이름, /RoleMap에서 (값은 이름 문자열입니다). |
ClassMap | : Map<string, PdfObject> | 읽기 | 클래스 이름 -> 속성 객체, /ClassMap에서 (원시, 해결되지 않은 값). |
Children | StructElement[] | 읽기 | 자식 항목을 가져옵니다. |
메서드
| 시그니처 | 설명 |
|---|---|
| `constructor(doc: Document, Dict: PdfDict, Ref: PdfRef | undefined)` |
ResolveRole(role: string) → string | role에서 RoleMap 체인을 따라 표준 구조 유형까지 이동합니다. |
ElementFor(structParentsKey: number, mcid: number) → `StructElement | undefined` |
ElementForObject(structParentKey: number) → `StructElement | undefined` |
GetText() → string | 전체 트리의 텍스트, 읽는 순서대로. |
Append(type: string, opts: ElemOpts) → StructElement | type의 최상위 구조 요소를 생성하고 해당 핸들을 반환합니다. |
RegisterRole(custom: string, standard: string) | /RoleMap에서 사용자 정의 구조 유형 custom을 표준 유형 standard에 매핑합니다 (딕셔너리를 기록하고 메모리 내 맵을 업데이트함). |