기술 문서

HotPDF Component: Delphi에서 PDF/A, PDF/X, and PDF/UA validation

HotPDF는 Delphi 및 C++Builder 애플리케이션을 위한 네이티브 VCL PDF 라이브러리입니다. 외부 PDF 런타임 배포 없이 PDF 생성, 편집, 양식, 주석, 암호화, 디지털 서명, Unicode 글꼴 처리, 표준 지향 출력, 프리플라이트 보고를 지원합니다.

이 글은 teams that deliver archival, print, or accessibility-sensitive PDF output from Delphi applications을 위한 글입니다. PDF/A, PDF/X, and PDF/UA validation을 단순한 컴포넌트 호출이 아니라 운영 환경의 문서 엔지니어링으로 다룹니다.

실제 위험은 a document can pass a visual review while missing fonts, output intents, tagged structure, metadata, or accessibility semantics required by the target standard입니다. 따라서 명확한 계약, 관찰 가능한 진단, 실제 고객 파일을 반영한 회귀 샘플이 필요합니다.

아키텍처 결정

Select the standard before generating pages. target profile and conformance level for each output channel / font embedding, color profile, metadata, and transparency policy

  • target profile and conformance level for each output channel
  • font embedding, color profile, metadata, and transparency policy
  • tagging, reading order, alternate text, and artifact treatment
  • whether validation warnings block release or require documented waivers

구현 흐름

Use preflight findings as engineering requirements. The order below keeps the workflow reviewable for Delphi and C++Builder teams.

  1. select the compliance profile before creating the first page object
  2. configure fonts, images, color spaces, metadata, and tagging around that profile
  3. run preflight after generation and parse findings into actionable categories
  4. fix the document source instead of patching the PDF when the issue is template-owned
  5. save the validation report with the output package or support evidence

검증 증거

Validation artifacts for release and support. Keep these fields with the output or support record.

  • profile name, validator version, pass or fail status, and issue severity counts
  • font, color, metadata, tag-structure, and annotation findings
  • waiver owner and business reason for every accepted warning
  • sample output opened in the target archive, print, or accessibility workflow

Compliance choices affect layout and content

PDF/A, PDF/X, and PDF/UA optimize for different guarantees. A single document may not satisfy every profile without tradeoffs in color management, interactivity, transparency, tagging, or embedded content.

Operational metrics to watch

The first release should expose enough metrics to prove the workflow is healthy under real files, not only under curated samples.

  • count and rate for profile name, validator version, pass or fail status, and issue severity counts
  • warning trend for interactive forms and JavaScript may conflict with archival profiles
  • latency of the stage that must select the compliance profile before creating the first page object
  • profile usage for target profile and conformance level for each output channel

PDF/A, PDF/X, and PDF/UA validation에 대한 엔지니어링 검토 노트

이 검토 노트를 사용해 기능이 데모 단계를 넘어섰고 출시, 지원, 고객 에스컬레이션 상황에서 설명할 수 있는지 확인합니다

  • 결정: target profile and conformance level for each output channel. 구현상 핵심 지점: configure fonts, images, color spaces, metadata, and tagging around that profile. 승인 증거: waiver owner and business reason for every accepted warning. 회귀 트리거: third-party template assets often introduce fonts or transparency outside policy
  • 결정: font embedding, color profile, metadata, and transparency policy. 구현상 핵심 지점: run preflight after generation and parse findings into actionable categories. 승인 증거: sample output opened in the target archive, print, or accessibility workflow. 회귀 트리거: interactive forms and JavaScript may conflict with archival profiles

경계 사례

  • interactive forms and JavaScript may conflict with archival profiles
  • print-ready color requirements do not automatically satisfy accessibility needs
  • tagged PDF repair late in the process is expensive and error-prone
  • third-party template assets often introduce fonts or transparency outside policy

Delphi / C++Builder 참고 사항

HotPDF Component should sit behind a small service boundary that receives files, streams, profiles, and credentials, then returns output paths, warnings, metrics, and validation status. 중요한 용어는 PDF/A, PDF/X, PDF/UA, preflight, output intent, tagged PDF.

Delphi 코드 예제

다음 Delphi 스케치는 이 주제에 맞는 실무형 서비스 경계를 보여 줍니다. 정책 검사, 로깅, 검증을 좁은 제품 호출 구간 밖에 두면 워크플로를 테스트하기 쉽습니다.

procedure ExportStandardsAwarePdf(const OutputFile: string; const ProfileName: string);
var
  Pdf: THotPDF;
  Report: string;
begin
  Pdf := THotPDF.Create(nil);
  try
    Pdf.FileName := OutputFile;
    ConfigureStandardsProfile(Pdf, ProfileName);
    Pdf.BeginDoc;
    WriteTaggedContent(Pdf);
    Pdf.EndDoc;
    Report := Pdf.CreatePreflightReport(OutputFile);
    FailBuildOnPreflightErrors(Report);
  finally
    Pdf.Free;
  end;
end;

운영 체크리스트

  • 워크플로는 빈 파일, 일반 고객 파일, 최악의 파일에서 실행합니다
  • 생성된 PDF는 대상 뷰어, 검증기, 프린터 또는 downstream 애플리케이션에서 엽니다
  • 제품 버전, 프로필 버전, 입력 해시, 출력 경로, 경과 시간, 경고 수를 기록합니다
  • 암호, 인증서, 임시 파일, 고객 데이터는 명확한 보존 규칙에 따라 관리합니다
  • 고객 파일이 새로운 경계 사례를 드러내면 회귀 문서를 추가합니다

제품 문서

HotPDF Component

추가 코드 예제

Pdf.PDFXCompliance := 'X-1a';
Pdf.Trapped := 'Unknown';        // mandatory key under ISO 15930
ICC := TFileStream.Create('FOGRA39.icc', fmOpenRead);
try
  Pdf.AddPDFXOutputIntent('FOGRA39 (ISO 12647-2:2004)', '', ICC, 4, 'DeviceCMYK');
finally
  ICC.Free;
end;
Pdf.BeginDoc;
// draw with CMYK-safe colors, no transparency, no encryption
Pdf.EndDoc;
Pdf.PDFUACompliance := True;     // auto-enables tagged PDF
Pdf.Lang := 'en-US';             // set explicitly; empty falls back to 'en'
Pdf.BeginDoc;

Root := Pdf.AddStructureElement(sstDocument, nil);
H1 := Pdf.EmitTaggedHeading(1, Root, 50, 700, 'Quarterly Report');
Para := Pdf.BeginTaggedContent('P', Root);
Pdf.CurrentPage.TextOut(50, 650, 0, 'Revenue grew in all regions.');
Pdf.EndTaggedContent;

Pdf.EndDoc;