Repository navigation
v1.7.0 — LTV signatures, charts v2, emoji sequences #73
Nizoka
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
pdfnative v1.7.0
Released 2026-08-21
The long-term-validation release. pdfnative now signs PDFs that stay verifiable for decades — the complete PAdES baseline ladder (B-B → B-T → B-LT → B-LTA, ETSI EN 319 142-1) with RFC 3161 timestamps, embedded revocation material and document timestamps, all through injected network providers so the engine itself never opens a socket. Around it: charts v2 (stacked/area/scatter, dual/log/time axes), colour-emoji flag & ZWJ sequences, print production (bleed/trim boxes, printer's marks,
/Trapped,/UserUnit), UAX #9 digit-order and glyph-mirroring conformance fixes, PDF/A declaration guards, and a hardening pass over the incremental writer and xref reader. 100% backward-compatible with v1.6.0 — every new capability is a new API or an additive option; existing inputs render byte-identically except where the previous behaviour was outright wrong (reversed RTL digits, unmirrored delimiters, mis-joined Arabic letterforms, per-revision/IDreuse — the Upgrade section lists every deliberate change). Zero runtime dependencies, 2665 tests across 122 files.Highlights
signPdfBytesWithTimestamp()(RFC 3161 signature timestamps),addValidationInfo()(/DSS+/VRIwith OCSP/CRL material),addDocumentTimestamp()(/DocTimeStamprevisions), multi-signature flows, andlistSignatures()inspection. Network transport is injected (TimestampProvider/RevocationProvider); a rejected or tampered TSA token is never embedded. New LTV guide.labelStride/labelRotation, #67).--sequences/--sequence-list(skin-tone forms included).BidiMirroring.txttable (rule L4, #71). The previous behaviour silently produced wrong data — reversed amounts, dates and reference numbers.console.warnonce per code, a customonDiagnosticsink, or a thrown error understrict: true.bleedshorthand, crop & registration marks drawn outside the TrimBox,/Trappedwith XMP parity, duplex/tray/page-range/copies print defaults, caller-supplied OutputIntent ICC, and large-format/UserUnit. Byte-identical when unused. New print guide.Added
signPdfBytesWithTimestamp(),collectValidationInfo()/embedValidationInfo()/addValidationInfo()(collect online through the injected provider, embed offline and deterministically),addDocumentTimestamp(),listSignatures(),vriKeyForContents(),buildDocTimeStampDict()./VRIentries key by the uppercase-hex SHA-1 of each signature's full/Contentsvalue; an existing/DSSis merged, never replaced.addSignaturePlaceholder({ allowMultiple, metadata, docTimeStamp }), thefieldNameselector onsignPdfBytes, and placeholder-baked/Sigmetadata (name,reason,location,contactInfo,signingTime,subFilter). Signed signatures are located by their real ByteRange values and can never be overwritten.SET OF(derSetOf, X.690 §11.6),derGeneralizedTime, SHA-1 (identification only, never a security digest), RSA SHA-384/512 digest agility, X.509 extension parsing (SKI/AKI, EKU +certHasEku, AIA OCSP/caIssuers URLs, CRL distribution points,ocsp-nocheck), CMSprofile: 'pades'with the ESS signing-certificate-v2 attribute (RFC 5035), CMS unsigned-attribute surgery (parseCmsSignedData,addUnsignedAttribute,buildAttribute— signed bytes untouched, fuzz-tested), RFC 3161 request/response/token handling, OCSP (RFC 6960) and CRL (RFC 5280) builders + parsers, and theTimestampProvider/RevocationProviderregistries.stackedBar/stackedBarH/area/scatterkinds, secondary right axis (axis2+ChartSeries.yAxis: 'right'),axis.scale: 'log',xAxis.type: 'linear' | 'time'with UTC-only tick math for byte-stable output, per-pointdataLabels, automatic x-label stride pluslabelStride/labelRotation(#67). Chart kinds 5 → 9; area fills mix toward white instead of using transparency (PDF/A-1b safe).sequencestable in the generated module (both VS-16 spellings registered), longest-match pre-pass in the text pipeline, regional indicators routed to sequence-capable fonts, per-codepoint fallback. Bundled: 51 flags (EU, UN, G20 + widely used locales) + 22 skin-tone-free ZWJ sequences; module budget 4096 → 5120 KB (actual 4582 KB, tree-shakeable). CLIpdfnative-build-emoji-font --sequences flags|zwj|all|noneand--sequence-list FR,DE,1F468-200D-1F680.src/core/pdf-diagnostics.tsconformance channel with additivestrict/onDiagnosticlayout options; codesPDFA_NO_FONT_ENTRIES(#69),PDFA_UNEMBEDDED_FORM_FONTandPDFA_DEVICE_CMYK_IMAGE.layout.printpage boxes (/TrimBox,/BleedBox,/ArtBox,/CropBox, ISO 32000-1 §14.11.2;bleedshorthand; validated within the MediaBox), printer's marks (§14.11.3 — 8 corner crop hairlines + 4 edge registration targets, strictly outside the TrimBox, configurable length/offset/weight),metadata.trapped(/Info /Trapped+pdf:TrappedXMP parity, declared via a PDF/A extension schema per ISO 19005 §6.6.2.3.2 so validators accept it;Unknownmaps to XMP absence per ISO 32000-1 Table 317), print viewer preferences (duplex,pickTrayByPDFSize, 1-basedprintPageRange→ 0-based/PrintPageRange,numCopies),layout.outputIntent(caller-supplied RGB ICC profile + condition strings under tagged modes; non-RGB profiles rejected with an actionable message), andprint.userUnitfor large formats (header raised to%PDF-1.7only when set; rejected underpdfa1b). Boxes and/UserUnitnow survivemergePdfs/splitPdf/extractPages(previously dropped). Byte-identical output when unused.PdfModifier.updateMetadata()— re-issues/Info(adding/ModDate) and keeps the XMP packet in sync (xmp:ModifyDate=xmp:MetadataDate, CreateDate andpdfaid:*preserved) per ISO 19005 §6.7.3 parity;PdfParams.metadataforwards author/subject/keywords to both/Infoand XMP inbuildPDF.signature-ltv(PAdES B-B/B-T/B-LT/B-LTA + multi-signature, offline mock PKI),charts-v2-showcase, colour-emoji sequences page,incremental-metadata, BiDi digits & mirroring page, andpersian-showcase(Persian joining, digits and mirrored delimiters) andprint-showcase(bleed + marks, explicit boxes, large-format banner, custom OutputIntent) — sample corpus 228 → 242 PDFs across 48 generators.npm run validate:pdfaauto-detects everypdfaid:part-claiming sample (18 PDF/A-claiming samples today) and now enforces a coverage canary againstdeclared.pdfaSamplesindocs/assets/ecosystem.json; CI validates with a pinned veraPDF (1.30.2) and the publish workflow re-runs docs verification, sample generation and the blocking PDF/A gate beforenpm publish;verify:docsgains a 17th rule (playground-syntax: every inline playground/homepage module script must parse undernode --check). CONTRIBUTING documents the local veraPDF setup for all three OSes, Windows.batlaunchers included.THIRD-PARTY-NOTICES.mdaggregates the third-party licenses (Noto fonts — SIL OFL 1.1; Unicode Character Database — Unicode License v3) and ships in the npm package; the projectLICENSEstays pure MIT.Changed
docs/assets/ecosystem.json+ the 17-rulenpm run verify:docsverifier (weekly--onlinenpm-drift job in CI), international SEO head block on every indexable page, and the full documentation-alignment train staged since v1.6.0 (see CHANGELOG for the per-file record).Fixed
BidiMirroring.txttable (Unicode 17.0.0, generated module): logical(X)no longer renders)X(around RTL content (#71)./ID(ID[0] preserved byte-exact, ID[1] regenerated deterministically, ISO 32000-1 §14.4); explicit integrity error on a present-but-invalid/Previnstead of silent chain truncation;/DecodeParms /Predictorsupport in xref streams; EOL framing after a bare%%EOF;/Sizerecovery from the xref's highest entry./ToUnicodecoverage in both builders — base-14 dicts reached under tagged mode, and the AcroForm/Helvdict in every mode; cmap inversion keeps a legitimately-mapped U+0000.PaintCompositedegradation — an unsupported SOURCE subtree renders its backdrop alone instead of dropping the whole glyph (Noto's flags render flat instead of falling back to tofu).validate:pdfanow works on Windows — the veraPDF.batlauncher is spawned through a shell with quoted arguments (Node's CVE-2024-27980 hardening rejects direct batch spawns; the swallowed error previously reported every sample as non-compliant). 18/18 PDF/A-claiming samples validate locally.Documentation
Install
Upgrade
No breaking changes. Drop-in replacement for v1.6.0. A few deliberate behaviour changes to be aware of:
labelStride: 1restores the old draw-everything behaviour./Helvfont dictionary now carries/ToUnicodein every mode (form text becomes searchable/extractable), so all form-carrying outputs change bytes (+~20 bytes in non-tagged mode, structure unchanged; tagged form documents additionally gain the shared CMap object).fontEntries(Latin text rendered through standard-14 Helvetica) now emits the shared WinAnsi/ToUnicodeCMap that tagged mode previously suppressed — bytes and object numbering change. Tagged documents with embedded fonts (CIDFont-only) stay byte-identical. The same configuration now also surfaces aPDFA_NO_FONT_ENTRIESdiagnostic (console.warnonce per code where v1.6.0 was silent; redirect withonDiagnostic, escalate withstrict: true— output bytes are unaffected by the diagnostic itself)./ID[1]per ISO 32000-1 §14.4 (/ID[0]stays byte-exact), and an EOL is inserted before the appended revision when the base document ends without one — every incremental output (placeholders, signatures, modifier saves) changes bytes; earlier revisions are still preserved verbatim as a prefix.PdfModifierinterface (as opposed to consumers ofcreateModifier()) must add the newupdateMetadatamethod; theChartTypeandSignatureAlgorithmunions widened, which can surface errors in downstream exhaustive switches.Downstream integration notes
pdfnative-clican wiresign --timestampontosignPdfBytesWithTimestamp()and itsverify --revocationpath can now consume/DSSwritten by the library.pdfnative-mcpadd_chartpasses through the new chart options unchanged (all JSON-serialisable).ChartTypewidened 5 → 9 — narrowing switch statements over it in downstream code will see new variants.sequencesexport; older pdfnative runtimes ignore it, older modules remain valid (FontData.sequencesis optional).Links
This discussion was created from the release v1.7.0 — LTV signatures, charts v2, emoji sequences.
All reactions