Skip to content

PDF/A-4 아카이브

Pro — Commercial License Required
PDF/A-4 규정 준수 기능은 Pro 패키지가 필요합니다.

TCPDF-Next Pro는 PDF 2.0 기반의 최신 아카이브 표준인 PDF/A-4 적합성(ISO 19005-4:2020)을 구현합니다.

아카이브 클래스

클래스목적
PdfAManagerPDF/A-4 규정 준수를 활성화, 검증, 적용
PdfAVersionEnum: A4, A4f, A4e
XmpMetadataDublin Core, XMP Basic, PDF/A 식별
OutputIntentsRGB 및 커스텀 ICC 색상 프로파일
IccProfile번들된 sRGB.icc 및 커스텀 프로파일 로딩

PdfAVersion

레벨사용 사례임베디드 파일3D / 리치 미디어
A4표준 아카이브아니요아니요
A4f첨부 파일이 있는 문서아니요
A4e엔지니어링 문서

PDF/A-4 활성화

php
use Yeeefang\TcpdfNext\Core\Document;
use Yeeefang\TcpdfNext\Pro\Archive\{PdfAManager, PdfAVersion, OutputIntent};

$pdf = Document::create()
    ->metadata(title: 'Annual Report 2026', author: 'Finance')
    ->addPage()
    ->font('NotoSans', size: 12)
    ->text('PDF/A-4 compliant document.');

PdfAManager::enable($pdf, PdfAVersion::A4)
    ->outputIntent(OutputIntent::srgb());

$pdf->save('/archive/report.pdf');

OutputIntent 및 IccProfile

PDF/A는 최소 하나의 출력 인텐트가 필요합니다. 내장 팩토리 메서드를 사용하거나 커스텀 ICC 프로파일을 로드합니다:

php
use Yeeefang\TcpdfNext\Pro\Archive\{OutputIntent, IccProfile};

OutputIntent::srgb();       // 화면 표시 (가장 일반적)
OutputIntent::fogra39();    // 유럽 코팅 오프셋
OutputIntent::gracol2006(); // 미국 상업 인쇄

// 커스텀 ICC 프로파일
$custom = new OutputIntent(
    subtype: 'GTS_PDFA1', outputConditionIdentifier: 'Custom_CMYK',
    info: 'Internal press profile', registryName: 'https://printing.example.com/profiles',
    iccProfile: IccProfile::load('/profiles/custom.icc')->bytes(),
);

XmpMetadata

PDF/A가 활성화되면 XMP 메타데이터가 자동으로 생성됩니다. 커스텀 속성을 추가할 수 있습니다:

php
$xmp = $pdf->xmpMetadata();
$xmp->set('dc:rights', 'Copyright 2026 Acme Corporation');
$xmp->registerNamespace('acme', 'https://acme.example.com/xmp/1.0/');
$xmp->set('acme:DocumentId', 'DOC-2026-0042');

검증 규칙

규칙요구 사항
출력 인텐트최소 하나 필수
폰트 임베딩모든 폰트가 임베딩되어야 함 (base-14 불가)
암호화허용되지 않음
JavaScript허용되지 않음
색상 공간장치 독립적이거나 출력 인텐트로 커버되어야 함
XMP 메타데이터존재하고 일관성이 있어야 함

적용 모드

위반이 발생할 때 즉시 포착합니다:

php
$manager = PdfAManager::enable($pdf, PdfAVersion::A4);
$manager->enforce(true);

$pdf->javascript(trigger: 'open', script: 'app.alert("Hello");');
// -> PdfAException: "PDF/A-4 violation: JavaScript actions are not permitted."

수동 검증

php
$result = $manager->validate();
foreach ($result->violations() as $v) {
    echo "{$v->severity()}: {$v->message()} [{$v->clause()}]\n";
}

PDF/A-4와 PAdES B-LTA 결합

php
use Yeeefang\TcpdfNext\Pro\Security\Signature\{DigitalSigner, CertificateInfo};
use Yeeefang\TcpdfNext\Pro\Security\Timestamp\TsaClient;
use Yeeefang\TcpdfNext\Contracts\Enums\SignatureLevel;

PdfAManager::enable($pdf, PdfAVersion::A4)
    ->outputIntent(OutputIntent::srgb());

$signer = new DigitalSigner(
    CertificateInfo::fromPkcs12('/certs/archive.p12', 'pw')
);
$signer->level(SignatureLevel::PAdES_B_LTA);
$signer->timestampAuthority(new TsaClient('https://tsa.example.com/timestamp'));

$signer->sign($pdf);
$pdf->save('/archive/signed-archival.pdf');

다음 단계

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