Skip to content

접근성 (PDF/UA)

Pro — Commercial License Required
PDF/UA 접근성 기능은 Pro 패키지가 필요합니다.

TCPDF-Next Pro는 스크린 리더 및 보조 기술과 호환되는 접근 가능한 PDF 문서를 생성하기 위한 전체 PDF/UA (ISO 14289-2) 지원을 제공합니다.

태그 PDF 활성화

php
use Yeeefang\TcpdfNext\Core\Document;

$pdf = Document::create()
    ->setTaggedPdf(true)
    ->setLanguage('en-US');

구조 트리

StructureTreeManager는 구조 태그를 사용할 때 문서 구조 트리를 자동으로 구성합니다:

php
$pdf->openTag('H1')
    ->cell(0, 10, 'Annual Report 2026', newLine: true)
    ->closeTag('H1')

    ->openTag('P')
    ->multiCell(0, 6, 'This report provides an overview...')
    ->closeTag('P');

지원 구조 요소

요소목적
Document루트 구조 요소
Part, Sect문서 섹션
H1 -- H6제목
P단락
Table, TR, TH, TD테이블 구조
L, LI목록 구조
Figure이미지 및 다이어그램
Link하이퍼링크
Span인라인 콘텐츠

역할 매핑

커스텀 태그 이름을 표준 PDF 구조 유형에 매핑합니다:

php
$pdf->setRoleMap([
    'invoice-header' => 'H1',
    'line-item' => 'TR',
    'summary' => 'P',
]);

이미지 대체 텍스트

php
$pdf->image('/path/to/chart.png', 10, 10, 100, 80, alt: 'Revenue chart showing Q1-Q4 growth');

PDF/A-4 + PDF/UA 결합

최대 규정 준수를 위해 아카이브와 접근성을 결합합니다:

php
$pdf = Document::create()
    ->enablePdfA(PdfAVersion::A4)
    ->setTaggedPdf(true)
    ->setLanguage('en-US');

LGPL-3.0-or-later 라이선스로 배포됩니다.