losLab PDF Library는 Delphi 및 C++Builder 팀에 소스 제공 PDF 엔진을 제공합니다. 데스크톱, 서버, DLL, ActiveX, Dylib 워크플로에서 PDF/A 및 PDF/UA 검사, PAdES 서명 지원, 렌더러 선택을 외부 PDF 서비스 없이 사용할 수 있습니다.
이 글은 developers generating accessible reports, statements, manuals, or public documents from Delphi을 위한 글입니다. tagged PDF accessibility structure을 단순한 컴포넌트 호출이 아니라 운영 환경의 문서 엔지니어링으로 다룹니다.
실제 위험은 a PDF can contain text and still be inaccessible if headings, tables, artifacts, alternate text, and reading order are missing or wrong입니다. 따라서 명확한 계약, 관찰 가능한 진단, 실제 고객 파일을 반영한 회귀 샘플이 필요합니다.
아키텍처 결정
Design semantic structure while generating content. heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping / alternate text ownership for charts, logos, signatures, and decorative images
- heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping
- alternate text ownership for charts, logos, signatures, and decorative images
- reading order for multi-column, repeated-header, and mixed-language content
- validation profile and manual review process for generated samples
구현 흐름
Treat tags as document data, not decoration. The order below keeps the workflow reviewable for Delphi and C++Builder teams.
- build a semantic outline in parallel with visual layout
- tag content as it is emitted so page geometry and structure stay aligned
- mark decorative elements as artifacts and supply alternate text for meaningful images
- validate PDF/UA-related diagnostics and inspect reading order manually
- keep accessible reference samples for every report template family
검증 증거
Accessibility evidence for generated PDFs. Keep these fields with the output or support record.
- structure tree summary, role map, heading order, table structure, and artifact count
- alternate text coverage for figures and chart-like content
- reading-order review notes for representative pages
- PDF/UA diagnostic report and remediation decisions
Reading order is an authoring responsibility
Tagged PDF output requires a structure tree, role mapping, alternate text, table relationships, artifacts, and reading order that match the visual document. Retrofitting those semantics after layout is far harder.
Decision table for tagged PDF accessibility structure
A decision table keeps product ownership visible when the same workflow is reused by a desktop tool, service job, and support utility.
| Decision | Engineering reason | Evidence |
|---|---|---|
| heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping | build a semantic outline in parallel with visual layout | structure tree summary, role map, heading order, table structure, and artifact count |
| alternate text ownership for charts, logos, signatures, and decorative images | tag content as it is emitted so page geometry and structure stay aligned | alternate text coverage for figures and chart-like content |
| reading order for multi-column, repeated-header, and mixed-language content | mark decorative elements as artifacts and supply alternate text for meaningful images | reading-order review notes for representative pages |
tagged PDF accessibility structure에 대한 엔지니어링 검토 노트
이 검토 노트를 사용해 기능이 데모 단계를 넘어섰고 출시, 지원, 고객 에스컬레이션 상황에서 설명할 수 있는지 확인합니다
- 결정: heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping. 구현상 핵심 지점: tag content as it is emitted so page geometry and structure stay aligned. 승인 증거: reading-order review notes for representative pages. 회귀 트리거: images with text may need both alternate text and source-data access
- 결정: alternate text ownership for charts, logos, signatures, and decorative images. 구현상 핵심 지점: mark decorative elements as artifacts and supply alternate text for meaningful images. 승인 증거: PDF/UA diagnostic report and remediation decisions. 회귀 트리거: visual headers repeated on every page should often be artifacts
- 결정: reading order for multi-column, repeated-header, and mixed-language content. 구현상 핵심 지점: validate PDF/UA-related diagnostics and inspect reading order manually. 승인 증거: structure tree summary, role map, heading order, table structure, and artifact count. 회귀 트리거: tables need header relationships, not only drawn grid lines
- 결정: validation profile and manual review process for generated samples. 구현상 핵심 지점: keep accessible reference samples for every report template family. 승인 증거: alternate text coverage for figures and chart-like content. 회귀 트리거: multi-column pages can read incorrectly if tags follow drawing order
- 결정: heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping. 구현상 핵심 지점: build a semantic outline in parallel with visual layout. 승인 증거: reading-order review notes for representative pages. 회귀 트리거: images with text may need both alternate text and source-data access
- 결정: alternate text ownership for charts, logos, signatures, and decorative images. 구현상 핵심 지점: tag content as it is emitted so page geometry and structure stay aligned. 승인 증거: PDF/UA diagnostic report and remediation decisions. 회귀 트리거: visual headers repeated on every page should often be artifacts
경계 사례
- visual headers repeated on every page should often be artifacts
- tables need header relationships, not only drawn grid lines
- multi-column pages can read incorrectly if tags follow drawing order
- images with text may need both alternate text and source-data access
Delphi / C++Builder 참고 사항
PDFlibPas should sit behind a small service boundary that receives files, streams, profiles, and credentials, then returns output paths, warnings, metrics, and validation status. 중요한 용어는 tagged PDF, structure tree, role map, alternate text, artifact, reading order.
Delphi 코드 예제
다음 Delphi 스케치는 이 주제에 맞는 실무형 서비스 경계를 보여 줍니다. 정책 검사, 로깅, 검증을 좁은 제품 호출 구간 밖에 두면 워크플로를 테스트하기 쉽습니다.
procedure InspectTaggedStructure(const FileName: string);
var
Pdf: TPDFlib;
begin
Pdf := TPDFlib.Create;
try
Pdf.LoadFromFile(FileName, '');
FTagReport := BuildStructureTreeReport(Pdf);
RequireAltTextForFigures(FTagReport);
RequireLogicalReadingOrder(FTagReport);
finally
Pdf.Free;
end;
end;
운영 체크리스트
- 워크플로는 빈 파일, 일반 고객 파일, 최악의 파일에서 실행합니다
- 생성된 PDF는 대상 뷰어, 검증기, 프린터 또는 downstream 애플리케이션에서 엽니다
- 제품 버전, 프로필 버전, 입력 해시, 출력 경로, 경과 시간, 경고 수를 기록합니다
- 암호, 인증서, 임시 파일, 고객 데이터는 명확한 보존 규칙에 따라 관리합니다
- 고객 파일이 새로운 경계 사례를 드러내면 회귀 문서를 추가합니다
제품 문서
추가 코드 예제
Lib.BeginTag('Table', '', '');
Lib.BeginTag('TR', '', '');
Lib.BeginTagEx2('TH', '', '', '', '', 'col-part', '');
Lib.SetStructElemScope('Column'); // valid only while this TH is open
Lib.DrawText(72, 120, 'Part');
Lib.EndTag;
Lib.BeginTagEx2('TH', '', '', '', '', 'col-torque', '');
Lib.SetStructElemScope('Column');
Lib.SetStructElemColSpan(2); // header spans the value and unit columns
Lib.DrawText(200, 120, 'Tightening torque');
Lib.EndTag;
Lib.EndTag;
Lib.BeginTag('TR', '', '');
Lib.BeginTag('TD', '', '');
Lib.SetStructElemHeaders('col-part'); // explicit binding for irregular tables
Lib.DrawText(72, 140, 'M8 flange bolt');
Lib.EndTag;
Lib.EndTag;
Lib.EndTag; // Table