PDF 2.0 baseline: the ISO 32000-2 clauses NextPDF implements
At a glance
Section titled “At a glance”Boundary statement. NextPDF implements the cited clauses; full ISO 32000-2 conformance is not asserted as a blanket claim.
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 and the
explicit limit. The library implements the cited clauses. It does not make a
blanket “fully ISO 32000-2 conformant” claim. A conforming file is one that a
conforming reader can process under the standard. That is a verifier’s
determination, not a library flag.
Install
Section titled “Install”composer require nextpdf/core:^3PDF 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.
Conceptual overview
Section titled “Conceptual overview”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
/IDidentifier. The/IDis file-unique and normalized out for comparison. This is why most multi-object output usesreproducibility_profile: structural, not bitwise. - Logical structure — §14.7.2: when tagged mode is enabled, the
StructTreeRootbaseline 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. It does not run a full ISO 32000-2
conformance assessment. Use an external validator, such as the Arlington
grammar checker or veraPDF, for that determination. NextPDF\Compliance ships
the byte-stream cross-checks (ArlingtonValidator) that surface structural
disagreements. They assist verification. They are not a certificate.
API surface
Section titled “API surface”| Symbol | Effect |
|---|---|
ConformanceMode::Plain | Default — unconstrained PDF 2.0 output. |
ConformanceMode::requiresPdf17(): bool | False for PDF 2.0 modes; the writer emits a %PDF-2.0 header. |
NextPDF\Compliance\Validator\ArlingtonValidator | Grammar cross-check against the Arlington PDF model (assists verification). |
Code sample — Quick start
Section titled “Code sample — Quick start”<?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";Code sample — Production
Section titled “Code sample — Production”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. The library makes no blanket conformance claim.
Edge cases & gotchas
Section titled “Edge cases & gotchas”/IDis 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::Plainis not PDF/A. It carries no OutputIntent orpdfaidmarker. Do not treat it as archival. - Implements ≠ fully conformant. This page lists the clauses NextPDF implements. It does not state that every ISO 32000-2 clause is satisfied for every document. That 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.
Performance
Section titled “Performance”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).
Security notes
Section titled “Security notes”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.
Conformance
Section titled “Conformance”| Claim | Spec | Clause | reference_id |
|---|---|---|---|
| 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 |
Citations are clause-id + reference_id pointers into the verification
corpus.
No standards text is reproduced; NextPDF summarizes clauses in its own words.