Skip to content
getnextpdf.com

PDF 2.0 conformance

ISO 32000-2:2020 is the PDF 2.0 base standard. NextPDF Core emits unconstrained PDF 2.0 by default (ConformanceMode::Plain): a %PDF-2.0 header, a document catalog, a cross-reference structure, and a conforming trailer. This page documents the baseline clauses NextPDF implements. The library implements the cited clauses. A conforming file is one that a conforming reader can process under the standard. That is a verifier’s determination.

Terminal window
composer require nextpdf/core:^3

PDF 2.0 baseline output is the Core default; you do not need a profile call. ConformanceMode::Plain is the default discriminator. The PDF/A-4, PDF/UA-2, PDF/X, and ZUGFeRD profiles are constrained subsets layered on this baseline.

Every NextPDF document starts as a PDF 2.0 file before any profile is applied. The writer satisfies the structural obligations ISO 32000-2 places on a conforming file:

  • Document catalog — §7.7.2: the root object referenced by the trailer’s /Root, present in every output.
  • Cross-reference structure — §7.5.8: a cross-reference table or stream that locates every object.
  • Trailer — §7.5.5: the trailer dictionary a conforming file shall carry, including the file /ID identifier. The /ID is file-unique and normalized out for comparison. This is why most multi-object output uses reproducibility_profile: structural, not bitwise.
  • Logical structure — §14.7.2: when tagged mode is enabled, the StructTreeRoot baseline that supports the PDF/UA-2 profile.
  • Version extension — §7.12: when a developer extension is declared, the Extensions dictionary / developer prefix mechanism.

NextPDF implements these clauses. Use an external validator, such as the Arlington grammar checker or veraPDF, for a full ISO 32000-2 conformance determination. NextPDF\Compliance ships the byte-stream cross-checks (ArlingtonValidator) that surface structural disagreements. They assist verification.

SymbolEffect
ConformanceMode::PlainDefault — unconstrained PDF 2.0 output.
ConformanceMode::requiresPdf17(): boolFalse for PDF 2.0 modes; the writer emits a %PDF-2.0 header.
NextPDF\Compliance\Validator\ArlingtonValidatorGrammar cross-check against the Arlington PDF model (assists verification).
<?php
declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use NextPDF\Core\Document;
$out = getenv('NEXTPDF_COOKBOOK_OUTPUT') ?: __DIR__ . '/baseline.pdf';
$doc = Document::createStandalone(); // ConformanceMode::Plain — PDF 2.0
$doc->setTitle('PDF 2.0 baseline');
$doc->writeHtml('<h1>Hello PDF 2.0</h1><p>Unconstrained baseline output.</p>');
$doc->save($out);
echo "Wrote {$out} (%PDF-2.0). Validate structure with an external checker.\n";

For production, run an external structural validator (Arlington / veraPDF) in continuous integration (CI) against representative output and gate on its report. The library emits the structure; the checker determines whether it conforms.

  • /ID is file-unique. Baseline output that contains a trailer /ID, /CreationDate, or font-subset prefixes is not byte-stable. Compare with the structural profile (qpdf-normalize), not a raw sha256.
  • Plain ≠ archival. ConformanceMode::Plain is not PDF/A. It carries no OutputIntent or pdfaid marker. Do not treat it as archival.
  • Per-document conformance is a verifier verdict. This page lists the clauses NextPDF implements; whether a given document satisfies every ISO 32000-2 clause is a per-document verifier verdict.
  • Extensions are namespaced. A developer extension uses the §7.12 Extensions dictionary with a registered prefix. An unprefixed private key is a baseline deviation.

Baseline emission is the engine’s core path. The budget is wall ≤ 1500 ms and peak ≤ 64 MB for a typical document. The baseline writer supports the backport matrix (PHP 8.1–8.4).

PDF 2.0 baseline output carries no encryption or signature unless you add one explicitly. Encryption provides confidentiality and is covered by a separate recipe. ISO permission bits are reader-cooperative, not access control. The baseline makes no security guarantee.

ClaimSpecClause
A conforming PDF 2.0 file shall carry a conforming trailer / file structure.ISO 32000-2§7.5.5
Every object is locatable via a cross-reference table or stream.ISO 32000-2§7.5.8
The file has a document catalog as its root object.ISO 32000-2§7.7.2
Conformance is framed in terms of conforming writers and readers.ISO 32000-2§7.2
Version extensions use the Extensions dictionary / developer prefix.ISO 32000-2§7.12
Tagged output builds on the ISO 32000-2 logical-structure baseline.ISO 32000-2§14.7.2

Each row cites the standard name and clause. No standards text is reproduced; NextPDF summarizes clauses in its own words.