pdfaManager !== null` short-circuits renderFooter(), because the * DEFAULT footer would paint unembedded Base14 Helvetica — an ISO * 19005-4:2020 §6.2.1 violation). The footer furniture is therefore painted * below as real body content via Document::text()/line() in embedded Inter, * the same body-furniture pattern the tagged samples use, at the exact * template footer geometry. The page marker is the literal "1 / 1": this is * a single-page document by construction (one writeHtml() flow, page count * pinned 1..1 by the pdf-audit expectation), and the dynamic * pageTotalPlaceholder() mechanism only exists on the unreachable callback * path. * * Under PDF/A the engine embeds every painted face, so the pdf-audit F1 gate * reports NO unembedded font on this file — archival conformance forbids any * non-embedded glyph. * * @see NextPDF\Core\Concerns\HasSecurity::enablePdfA() * @see NextPDF\Core\Concerns\HasTextOutput::writeHtml() */ require __DIR__ . '/../lib/bootstrap-premium.php'; use NextPDF\Samples\Edition; use NextPDF\Samples\PrintPalette; use NextPDF\Samples\SampleSpec; use NextPDF\Samples\SampleTemplate; use NextPDF\Samples\Typography; $spec = new SampleSpec( id: 'archival', title: 'Records Retention Statement', description: 'An archival master preserved in PDF/A-4 (ISO 19005-4:2020): a records retention schedule with an embedded sRGB output intent, an XMP conformance packet, and fully embedded font subsets for faithful long-term reproduction.', capability: 'PDF/A-4 archival conformance', edition: Edition::Enterprise, standards: ['ISO 32000-2', 'ISO 19005-4 (PDF/A-4)'], ); $template = new SampleTemplate($spec); $doc = SampleTemplate::createDocument($spec); // enablePdfA() MUST run before apply()/addPage()/content: the writer decides // the PDF/A output intent, XMP packet, and font-embedding policy at document // setup time. No argument => PDF/A-4 (ISO 19005-4:2020). $doc->enablePdfA(); $template->apply($doc); $doc->addPage(); $template->masthead($doc); $template->registerFaces($doc, [['Inter', 'B']]); // emphasis + kv labels + totals $body = <<<'HTML'

This record is preserved as an archival master in PDF/A-4 (ISO 19005-4:2020) — the long-term preservation conformance level of PDF 2.0. Every font is embedded as a subset, all colour is bound to an embedded sRGB output intent, and the descriptive metadata is written as an embedded XMP packet, so the file stays faithfully reproducible decades after creation — independent of the software that renders it.

PRESERVATION INTENT

The retention schedule below governs how long each class of business record is kept, what event starts the clock, and how the record is disposed of at the end of its term. Preserving the schedule in a validated archival format means the policy itself survives migrations, vendor changes, and format churn — a reader in 2050 opens the same authoritative statement produced today, byte-for-byte reproducible from this deterministic build.

ARCHIVAL METADATA

ConformancePDF/A-4
StandardISO 19005-4:2020
Base formatPDF 2.0
Colour intentsRGB IEC 61966-2.1
MetadataXMP (embedded)
FontsEmbedded subsets

Records retention schedule

Record class Retention period Retention trigger Disposition
Financial & tax records 7 years Fiscal year end Secure destruction
Contracts & agreements 10 years Contract expiry Archival review
Personnel records 6 years End of employment Secure destruction
Corporate governance Permanent Permanent archive
Regulatory correspondence 5 years Matter closure Secure destruction
Audit & compliance logs 3 years Report issuance Secure destruction

Retention periods are illustrative of a typical corporate records policy; the governing schedule for any jurisdiction is set by that organisation's legal and compliance owners.

ISO 19005-4:2020 conformance

This file declares pdfaid part 4 in its XMP packet, carries a GTS_PDFA output intent with an embedded sRGB IEC 61966-2.1 profile, and embeds every font program as a subset — the three structural guarantees ISO 19005-4 requires for long-term reproduction. Validate independently against the veraPDF PDF/A-4 reference implementation before relying on the file for preservation.

HTML; $css = <<<'CSS' CSS; $doc->writeHtml(SampleTemplate::sharedCss() . $css . $body); // ---- Footer as body content (see file docblock: the engine suppresses the // footer callback for every PDF/A document) — template geometry + palette, // painted in embedded Inter 7 pt. ----------------------------------------- $pageWidth = $doc->getPageWidth(); $pageHeight = $doc->getPageHeight(); $left = SampleTemplate::mm(SampleTemplate::MARGIN_LEFT_MM); $right = $pageWidth - SampleTemplate::mm(SampleTemplate::MARGIN_RIGHT_MM); $ruleY = $pageHeight - SampleTemplate::mm(SampleTemplate::FOOTER_RULE_Y_MM); $baseY = $pageHeight - SampleTemplate::mm(SampleTemplate::FOOTER_BASELINE_Y_MM); $doc->setDrawColor(...PrintPalette::rgb(PrintPalette::HAIRLINE)); $doc->setLineWidth(0.4); $doc->line($left, $ruleY, $right, $ruleY); $footerFontKey = Typography::fontKey(Typography::FAMILY_TEXT); $footerSize = Typography::SIZE_FOOTER; $doc->setFont(Typography::FAMILY_TEXT, '', $footerSize); $doc->setTextColor(...PrintPalette::rgb(PrintPalette::MUTED)); $doc->text($left, $baseY, SampleTemplate::FOOTER_BRAND); $metrics = $doc->fontMetrics(); $urlWidth = $metrics->getStringWidth(SampleTemplate::FOOTER_URL, $footerFontKey, $footerSize); $doc->text($left + (($right - $left) - $urlWidth) / 2, $baseY, SampleTemplate::FOOTER_URL); $marker = '1 / 1'; // single-page by construction; see file docblock $markerWidth = $metrics->getStringWidth($marker, $footerFontKey, $footerSize); $doc->text($right - $markerWidth, $baseY, $marker); $output = \getenv('NEXTPDF_SAMPLE_OUTPUT') ?: __DIR__ . '/../output/archival.pdf'; $doc->save($output); echo "Created: {$output}\n";