THotPDF.ValidatePDFUA2Structure Method
producer 또는 로드된 객체 그래프에 대해 bounded PDF/UA-2 구조 검증을 실행하고, 문서를 바꾸지 않으면서 안정적인 구조화 진단을 돌려줍니다
선언
function ValidatePDFUA2Structure(
const Options: THPDFUA2ValidationOptions;
out Issues: THPDFUA2ValidationIssues): boolean; overload;
function ValidatePDFUA2Structure(
const Options: THPDFUA2ValidationOptions;
out Findings: THPDFComplianceFindings): boolean; overload;
유닛
HPDFDoc
검증 옵션
엄격한 생성 검증에는 THPDFUA2ValidationOptions.Default를 쓰고, intake 진단에는 개별 semantic policy를 조정합니다
| 필드 | 목적 |
|---|---|
HeadingPolicy | 건너뛴 heading level을 무시하거나, 진단하거나, 거부합니다 |
AllowDocumentFragmentHeadingStarts | DocumentFragment 안에서 heading 컨텍스트를 초기화합니다 |
CheckDocumentSemantics | Catalog 언어, metadata, 표시 제목, optional content, embedded file을 검사합니다 |
CheckHumanReadableStrings | 사람이 읽는 string의 Unicode private-use 문자를 거부합니다 |
CheckAnnotationSemantics | 페이지 tab order, 주석 소유권, role, flag, 설명, appearance stream을 검사합니다 |
CheckFormSemantics | AcroForm 필드, widget, label, 액션, 옵션, rich value를 검사합니다 |
CheckNavigationSemantics | 구조 destination, outline, 중첩 page-label number tree를 검사합니다 |
RequireListLabels | 번호 매긴 각 list 항목에 Lbl 하나를 요구합니다 |
RequireExplicitTableHeaderAssociations | scope 추론에만 의존하는 data cell을 보고합니다 |
CheckListSemantics | 번호 매기기, 연속 체인, caption, label, body, 실제 콘텐츠 직접 배치를 검사합니다 |
CheckTableSemantics | bounded grid geometry, row group, span, scope, 테이블 로컬 header 연결을 검사합니다 |
CheckRubyWarichuSequences | Ruby와 Warichu에 요구되는 정확한 직계 자식 시퀀스를 검사합니다 |
CheckPronunciationHints | 발음 항목 타입과 indirect embedded PLS lexicon을 검사합니다 |
RequireStructureAssociatedFiles | 모든 catalog associated file이 구조에서 도달 가능하도록 요구합니다 |
RequireFormulaTextAlternative | 수식에 Alt, ActualText, 또는 연결된 MathML을 요구합니다 |
MaxObjects | indirect 객체 스캔을 제한하며 기본값은 1,000,000 객체입니다 |
MaxIssues | 보관되는 진단을 제한하며 기본값은 256개입니다 |
반환 값
uisError 진단이 하나도 남아 있지 않을 때만 True를 반환합니다
진단
THPDFUA2IssueSeverity는 warning과 error를 구분하고, 각 THPDFUA2ValidationIssue는 안정적인 namespaced code, 해당 조항, 객체 경로, 객체 번호, 알려진 경우 0부터 세는 페이지 인덱스, 사람이 읽을 수 있는 message를 THPDFUA2ValidationIssues array에 담습니다
- 검증은 누락된
StructTreeRoot나 namespace dictionary를 만들어주지 않습니다 - namespace 인식 role map은 cycle과 깊이 감지를 하면서 전이적으로 resolve합니다
- 문서 metadata, 사람이 읽는 string, optional content, 구조 요소, parent backlink, attribute, 주석, form, navigation, associated file, heading, list, 테이블, Ruby, Warichu, 발음 힌트, 수식, MathML을 bounded 한 번의 패스로 검사합니다
- 로드된 문서의 주석 소유권은 물리적 ParentTree에서 resolve되며, producer 상태에 의존하지 않고 scalar 또는 array
K항목을 지원합니다 - 로컬 navigation은 structure destination을 요구하고, 호환되는
D폴백보다SD를 먼저 적용하며, 중첩 page-label number tree를 검증합니다 - XMP property는 namespace URI로 resolve하므로 유효한 대체 prefix도 상호 운용됩니다
- 테이블 진단은 invalid span, cell 교차, 비정형 row와 row group, 테이블 간 ID, 중복 또는 순환 header 참조, 알고리즘 연결 누락을 구분합니다
- list 진단은 invalid 번호 매기기, 감싸지 않은 콘텐츠, label과 body 구조, 같은 수준의 순서형 연속 참조, 연속 cycle을 구분합니다
- 확장 테이블 geometry는
MaxObjects한도를 공유하며ua2.table.limit.cells로 fail closed 합니다 ua2.limit.objects는 과도하게 큰 그래프를 스캔하기 전에 fail closed 합니다
기계 판독 가능 findings
THPDFComplianceFindings overload는 같은 bounded 검증 패스를 검증 순서를 바꾸거나 그래프를 수정하지 않고 공용 compliance 모델로 매핑합니다
각 finding은 PDF/UA-2, 심각도, rule ID, 표준 조항, 경로, 객체 번호, 페이지 인덱스, message, crsNotAttempted repair 상태를 식별합니다