Browser Alpha Matting
Deterministic C99/WebAssembly & TypeScript library for closed-form alpha matting and unpremultiplied RGBA halo removal in client-side scientific imaging.
Zero-dependency ISO 14289-1 (PDF/UA-1) & Matterhorn Protocol structural tag auditor and incremental-update stream inspector.
pdf-ua-inspector is a deterministic, zero-dependency binary stream parser and structural accessibility auditor for Portable Document Format (ISO 32000-1 / ISO 32000-2) files, engineered around the machine-testable checkpoints of ISO 14289-1 (PDF/UA-1), EN 301 549, and the PDF Association Matterhorn Protocol v1.1.
Unlike server-bound Java or C++ validators that require uploading confidential clinical, legal, or public-sector records, pdf-ua-inspector executes entirely in memory across JavaScript/TypeScript (ESM & WebAssembly), C99, Java 11+, D, and Clojure runtimes.
| Checkpoint ID | Normative Clause | Structural Verification Target |
|---|---|---|
01-001 | ISO 14289-1 §7.1 | Catalog /MarkInfo << /Marked true >> without /Suspects true |
01-002 | ISO 14289-1 §7.1 | Presence and object integrity of /StructTreeRoot |
06-001 | ISO 14289-1 §5 | XMP metadata stream declaration of pdfuaid:part |
07-001 | ISO 14289-1 §7.1 | Non-empty document title in /Info (UTF-16BE / PDFDocEncoding) or dc:title |
07-002 | ISO 14289-1 §7.1 | /ViewerPreferences << /DisplayDocTitle true >> |
09-003 | ISO 14289-1 §7.18.3 | Page annotation tabbing order /Tabs /S following logical structure |
11-001 | ISO 14289-1 §7.2 | Valid BCP 47 natural language tag in Catalog /Lang |
npm install pdf-ua-inspector
import { inspectPdfUaBytes } from "pdf-ua-inspector";
const report = inspectPdfUaBytes(pdfUint8Array);
console.log(report.score, report.isPdfUaCandidate, report.failedCheckpoints);
gcc -O2 -Wall -Wextra -std=c99 src/pdf_ua_inspector.c -o pdf-ua-inspector
./pdf-ua-inspector --json report.pdf
In addition to accessibility tag verification, the engine maps every startxref and %%EOF boundary across incremental saves to flag residual unflattened objects and active-content vectors (/JavaScript, /OpenAction, /Launch, /XFA).
Deterministic C99/WebAssembly & TypeScript library for closed-form alpha matting and unpremultiplied RGBA halo removal in client-side scientific imaging.
Open-source DCAT-AP v3, 5-Star Open Data, and EN 301 549 / ISO 14289-1 (PDF/UA-1) compliance observatory for European public-sector catalogs.