Testland
Browse all skills & agents

qa-pdf-print

PDF + print rendering tests: 4 skills (html-to-pdf-regression, pdf-accessibility-checker, pdf-snapshot-tester, print-stylesheet-tests) and 1 agent (pdf-test-author). Covers print/PDF output where qa-visual-regression covers screen output.

Install this plugin

/plugin install qa-pdf-print@testland-qa
View source

Part of role bundle: qa-role-frontend

qa-pdf-print

Print + PDF rendering testing - closes the gap left by qa-visual-regression (which covers screen output but not print/PDF). Critical for invoices, contracts, statements, regulatory filings.

Components

TypeNameDescription
Skillpdf-snapshot-testerPer-page render via pdftocairo / pdf2image; pixel-diff via Pillow / pixelmatch; page-range targeting; font-substitution detection; UPDATE_PDF_BASELINES workflow
Skillprint-stylesheet-testsPlaywright emulateMedia({ media: 'print' }) + page.pdf(); @page size + margin tests; printBackground + preferCSSPageSize; page-count regression tests
Skillhtml-to-pdf-regressionCross-engine HTML→PDF (Chromium / WeasyPrint / wkhtmltopdf); per-engine baseline; font-embedding verification; engine-version pinning
Skillpdf-accessibility-checkerPDF/UA-1 (ISO 14289) conformance via veraPDF; Tagged PDF + StructTreeRoot + MarkInfo /Marked; Alt text + /Lang + /Title; WCAG 2.1 PDF technique mapping
Agentpdf-test-authorDetects PDF engine (Chromium page.pdf() / WeasyPrint / wkhtmltopdf) from project config and emits one test file per output type; activates pdf-accessibility-checker for tagged PDFs

Install

/plugin marketplace add testland/qa
/plugin install qa-pdf-print@testland-qa

Skills

html-to-pdf-regression

Cross-engine HTML→PDF regression - generate the same source HTML through Chromium `page.pdf()`, WeasyPrint (Python, BSD), and wkhtmltopdf, then compare per-engine outputs page-by-page. Catches engine-specific font embedding bugs, page-break drift, @page rule support gaps. Pair with pdf-snapshot-tester for the per-engine pixel diff. Use when a project is swapping or upgrading its PDF engine, or when one shared HTML template is rendered by more than one engine and the outputs must stay equivalent.

pdf-accessibility-checker

Test PDF accessibility (PDF/UA conformance) - tagged-PDF structure (StructTreeRoot), alternative text on images (Alt), reading-order, language metadata (Lang), document title, heading hierarchy. Use veraPDF / PAC (PDF Accessibility Checker) / pdfix / Adobe Acrobat Pro headless; map each finding back to WCAG 2.1 PDF Techniques (PDF1 - PDF23). Use when a product ships customer-facing PDFs into a context that mandates PDF/UA - US Section 508, EU Directive 2016/2102, or a public-sector tender - and each file must be proven tagged before release.

pdf-snapshot-tester

Test PDF outputs by converting per-page to images (`pdftocairo` / pdf2image / Poppler) and running pixel-diff (pixelmatch / Resemble.js / Pillow `ImageChops`) against approved baselines. Per-page-range targeting, threshold tuning, font-substitution warnings, byte-stable PDF metadata stripping (CreationDate, /ID). Use when a product generates invoices, contracts, or regulatory filings whose layout must not shift, and a PDF template, font pack, or generation library is about to change.

print-stylesheet-tests

Test CSS print-media output via Playwright `page.emulateMedia({ media: 'print' })` + `page.pdf()` - `@page` rule (size, margin, orphans, widows), `@page :first / :left / :right` pseudo-classes, `break-before/after/inside`, `@media print` selector activation, page-break suppression on headings. Use when an app exposes a Print button or a print stylesheet exists but is untested, and users report the printed or PDF copy breaking in the wrong places while the on-screen page looks fine.