Repository navigation
PDF A3 EInvoice
SIDHARTH SINGH edited this page Dec 3, 2026
·
1 revision
Electronic invoicing across both Europe (ZUGFeRD / Factur-X EN 16931) and India (GST IRP IRN + Signed QR) combines visual archival PDF layout with machine-readable payloads.
-
PDF/A-1b,PDF/A-2b, andPDF/A-3b:validatePdfA()andenforcePdfA()strip forbidden actions (JavaScript,Launch, externalURI), embed uncompressed UTF-8 XMP headers and a synthetic 5-tag sRGB ICC output intent, validate embedded fonts, and permit structured/AFRelationshipfile attachments cleanly onPDF/A-3b. -
UN/CEFACT CII XML Builder (
buildCiiXml()): Generates Factur-Xminimumoren16931rsm:CrossIndustryInvoiceXML from structured invoice data with entity escaping. -
PDF/A-3b Attachment (
attachEInvoice()): Embeds any XML payload into Catalog/Names/EmbeddedFilesand/AFarrays with/AFRelationship(/Data,/Source,/Alternative,/Supplement). -
Pure-TS ISO-18004 QR & India IRP JWT Verification (
qr.ts):parseIndiaIrpQr()decodes IRP JWT payloads, checks Seller/Buyer GSTIN checksums withisValidGstin(), verifies RS256/ES256 signatures when given NIC public keys, andgenerateQrSvg()outputs crisp vector QR barcodes up to Version 40 without external npm packages.
const einvoice = await engine.renderEInvoice(invoiceData, htmlTemplate, {
cii: { profile: 'en16931' },
indiaQr: {
irpPayload: signedIrpJwt,
publicKeyPem: nicPubKey,
verifySignature: true,
},
});Place {{ONEX_QR}} inside your HTML to position the generated SVG QR anywhere cleanly; if omitted, ONEX appends a compact QR block inside <body>, embeds CII XML, converts to PDF/A-3b, and runs a final extraction round-trip audit confirming visual figures match structured fields.
- Home
- Architecture & Render Pipeline
- PDF Internals & Extraction
- Unicode 16, Fonts & Legacy Indic
- Security & SSRF Model
- Digital Signing (
signPdf) - True Redaction (
redactPdf) - Semantic Diff & Redlines (
diffPdfs) - Self-Auditing Renders (
renderVerified) - PDF/A-3b & E-Invoices (
renderEInvoice) - HTTP, MCP, CLI & Puppeteer
Handbook & Deep Analysis: bahubalisid.github.io/onex