npm @embedpdf/core 3.3.0
Release v3.3.0

one hour ago

@cloudpdf/contract@3.3.0

Minor Changes

  • #1093 by @bobsingor – doc.versions.analysis takes engine in place of policy. engine is the analysis value of the layer's head: with it, a settled answer is cached. Without it, or with another value, the answer is the server's own and is not cached. A server ignores policy, and no longer refuses a request for it.

    doc.versions.signatures takes engine as well, the signatures value of the layer's head, with the same rule for caching.

  • #1088 by @bobsingor – Two operations, doc.signatures.validationInfo and doc.signatures.addValidationInfo, read and store the validation data a file holds for checking its signatures with no network. doc.signatures.prepare takes a document timestamp with no field, and its answer may carry the field the engine made. All of it arrived in 3.3.

@cloudpdf/engine@3.3.0

Minor Changes

  • #1088 by @bobsingor – Long-term validation works on the cloud engine.
    • doc.signatures.getValidationInfo() reads the validation data the layer's file holds, pinned at the document version like the signature list. doc.signatures.addValidationInfo() stores more through a route of its own, publishes signatures.validationInfoAdded, and everyone else with the layer open receives the same event. So addValidationInfo() from @embedpdf/core-signature runs over the cloud engine as it does locally: the app collects the answers and the server stores them.
    • A document timestamp needs no field: sign(doc, { kind: 'timestamp', key }) and prepare({ kind: 'timestamp' }) work, and the server makes the field.
    • All three need a server of version 3.3. An older one is never sent them: they fail with NotImplemented, with details.needs and details.serverVersion. Checking signatures against an older server still works.

Patch Changes

  • #1093 by @bobsingor – doc.signatures.analyze() no longer sends the number of its judging rules (policy), which a server on other rules refused: the verdict then read 'indeterminate'. It sends the server's analysis engine value instead, so the answer for a saved version is still cached. It works with a server of 3.0 to 3.2 as it does with a newer one.

@cloudpdf/sdk@3.3.0

Minor Changes

  • #1093 by @bobsingor – doc.versions.analysis() takes engine in place of policy. engine is the analysis value of the layer's head: with it, a settled answer is cached. Without it, or with another value, the answer is the server's own and is not cached. A server ignores policy, and no longer refuses a request for it.

    doc.versions.signatures() takes engine as well, the signatures value of the layer's head, with the same rule for caching.

  • #1088 by @bobsingor – doc.signatures.validationInfo() and doc.signatures.addValidationInfo() read and store the validation data a file holds for checking its signatures with no network: certificates, OCSP responses and CRLs, each entry as base64. A prepared signature's answer may carry field, the field the engine made for a document timestamp prepared with none.

@cloudpdf/server@3.3.0

Minor Changes

  • #1093 by @bobsingor – A change analysis is never refused for the rules it was asked under. The rules that judge what a signature allows after it are now a part of the analysis engine value in /head, as the API evolution convention has every rule the server computes with.

    Before, a client put the number of those rules in the analysis URL (policy), and the server answered InvalidArg for any number but its own. A server on new rules refused every older viewer, which then showed "what changed since the signature" as indeterminate.

    • GET …/signatures/analysis@<token>: a token that carries policy, as a client of 3.0 to 3.2 writes it, is answered like any other. The token's engine value decides whether the answer is cached.
    • GET …/versions/analysis/:sha256 takes engine, the analysis value from /head. With this server's value a settled answer is immutable. With another value, or with none, the answer is this server's own, with no-store and the current value in EmbedPDF-Engine. A policy parameter is ignored.
    • An analysis that a worker judged under other rules, in the middle of a deploy, is answered uncached. It was an error.
    • GET …/versions/signatures/:sha256 takes engine too, the signatures value from /head, with the same rule: immutable with this server's value, no-store with another or with none. It was immutable whatever the server read from the file, so a field added to that answer could not have reached a cache that held the old one.
    • The analysis engine value changes once with this release, so cached analyses are computed again.
  • #1088 by @bobsingor – Validation data for signatures, and a document timestamp with no field.

    • GET /v1/docs/:docId/layers/:layerName/signatures/validation-info answers the certificates, OCSP responses and CRLs the layer's file holds, each as base64. Its @token form is pinned at docVersion and cached like the signature list. It needs doc.forms.read.
    • POST to the same path stores more. Each entry is checked to be one DER object of at most 16 MiB, an entry the file already holds is not stored again, and the answer counts the new ones. It needs doc.sign for the document, and a certification that allows no changes forbids it. The document version moves, and the audit row, of the new kind signature.addValidationInfo, carries the counts and never the entries. A client older than 3.3 gets a full refresh in its place.
    • The server asks no certificate authority: it stores what it is given.
    • POST …/signatures/prepare takes a document timestamp with no field. The worker makes the field, the answer names it in field, and it needs doc.sign for the document.
    • Changing the metadata of a layer is now refused after a certification that allows no changes, before the write reaches a worker.

@embedpdf/core-annotation@3.3.0

Minor Changes

  • #1096 by @bobsingor – dropsWaitingInk(before, after, message) says whether a message took the place of an ink drawing that waited in the draft for its next stroke (a pen stroke held back with deferInkCommit). A host that runs update itself uses it to make the strokes an annotation with finishInkDraft first, and then run the message again.

@embedpdf/core@3.3.0

Minor Changes

  • #1091 by @bobsingor – CommandDefinition, CommandFamily, CommandContext and IconAccent are core types now, so a plugin can ship commands without depending on the commands plugin, which still exports them. @embedpdf/core/commands has createDocumentCommands(): download and print, which take the browser's file download as an argument. @embedpdf/core/testing gains createTestCommandContext(), a command context over stand-in capabilities for testing a plugin's commands.

@embedpdf/core-signature@3.3.0

Minor Changes

  • #1088 by @bobsingor – Long-term validation: addValidationInfo() keeps a signature checkable for years, and validateSignatures() says whether a certificate was withdrawn and whether the file holds everything to check a signature with no network.

    addValidationInfo(doc, { trust, revocation }). Once a document is signed and timestamped, it asks the certificate authorities whether each certificate was still good, checks every answer, and stores them in the file with the certificates a reader needs to follow the same paths. Acrobat then calls the signature "LTV enabled", and nobody has to be asked again.

    • It asks about each certificate between the signer and the one you trust, and the same for the timestamp's authority: the answers the file holds first, then known (answers and certificates you already have), then revocation, at the addresses the certificates name, OCSP before the issuer's list. An issuer's certificate that a signature left out is fetched from the address the certificate names, and is only ever a candidate for the path.
    • It returns { added, verdicts }: how many entries of each kind it stored, and what validateSignatures() says about the result.
    • All or nothing: when a signature would not read as complete, nothing is stored. It throws Network, with the address in details.source, when an address didn't answer, and otherwise SignatureRefused with details.reason ('no-timestamp', 'untrusted', 'no-answer' or 'revoked'), details.certificate and details.field. partial: true stores what there is instead.
    • fields covers some signatures only, and maxCrlBytes (1 MiB) is the largest list it stores.
    • Calling it again asks for nothing the file holds and adds nothing.

    httpRevocationSource({ url }) is a RevocationSource for a web page, which can't ask a certificate authority itself: each question goes to a route of your own. It takes url, headers, fetch, timeoutMs and retries, as httpTimestampAuthority() does, and tries again only when no answer came.

    @embedpdf/core-signature/server, a new entry, has the routes, for any server that speaks the Fetch API:

    • revocationRoute() answers httpRevocationSource(). The addresses it is sent come from certificates, so it decides where it may go: only public http and https addresses, never a private or local one, a name that leads to one, or a redirect to either. It limits how large and how slow an answer may be, passes on only an OCSP response, a list of withdrawn certificates or a certificate, and keeps answers for as long as their authority's cache headers allow.
    • timestampRoute({ url }) passes a timestamp request on to the authority you name, with headers a page must not hold.

    validateSignatures(doc, { trust, revocation }) asks for the answers the file lacks and uses them for that check, without storing anything. An address that doesn't answer leaves revocation at 'unknown'. longTerm stays about what the file holds.

    sign(doc, { kind: 'timestamp', key }) needs no field. The engine makes a field for the document timestamp, so the last step of keeping a file checkable is one call. result.signature.fieldName says which field it is.

    A signature is judged at its timestamp by default. validateSignatures() judges each certificate at the earliest trusted timestamp that covers what it signed, and as of now when there is none. It is the time a reader such as Acrobat judges at, and with the answers in the file read, a certificate is not accepted on its dates alone. validationTime: { kind: 'now' } judges every certificate as of now; { kind: 'earliest-timestamp' } names the default. The option takes what it took before.

    • What changes for an app that already validates: a signature whose signer's certificate expired after it was signed, and that carries a timestamp from an authority you trust, reads 'valid' where it read 'valid-untrusted'.
    • Judged at its timestamp, a signature reads revocation: 'good' from the answers stored when it was signed, and a certificate withdrawn after the timestamp does not make it 'invalid'. Judged as of now, the same answers read 'unknown', and the withdrawal reads 'invalid'.
    • A signature with no timestamp you trust is judged as of now, as before.

    validationTime names a timestamp's time stampedAt. { kind: 'timestamp', stampedAt, tokenVerified: true }: the name the timestamp's own verdict uses, so the time a verdict reports reads the same wherever it appears.

    • genTime, its name until now, still works until 4.0. A verdict's validationTime carries the time under both names, with the same value (AppliedValidationTime), and the option takes either. Given both, stampedAt is the one used.
    • On a value you type as ValidationTime yourself, genTime is optional now. A verdict's validationTime always has it.

    revocation on every verdict. 'good', 'revoked' or 'unknown': whether a certificate between the signer and your anchor was withdrawn by validationTime. revocationReason names the certificate when it isn't 'good'. A timestamp's verdict has both too, for its authority.

    • The answers come from the file and nothing is asked over a network: the document's validation data (doc.signatures.getValidationInfo()), the OCSP responses and CRLs a signature carries in its CMS, and Acrobat's adbe-revocationInfoArchival attribute. Each answer is checked by its own signature, wherever it sits.
    • An answer speaks for a time. One stored at signing says the certificate was good then, so a signature judged at its timestamp reads 'good', and judged as of now it reads 'unknown'. A certificate withdrawn after the timestamp reads 'good' at the timestamp and 'revoked' as of now.
    • summary is 'invalid' when a trusted signer's certificate is proven withdrawn by the time it is judged at. It was 'valid' before, because nothing was checked. 'unknown' never changes summary. A timestamp whose trusted authority is proven withdrawn is 'invalid' and no longer counts as a trusted time.
    • A certificate you trust as it is has nobody above it to withdraw it, so it reads 'good'.

    longTerm on every verdict. { enabled, provenAt, expiresAt, documentTimestampedAt, missing }, always judged at the time a timestamp proves, whatever validationTime is.

    • enabled is what Acrobat calls "LTV enabled": a timestamp you trust covers the signature, the signer was trusted then, and the file holds a good answer for every certificate of the signer's path and of the timestamp authority's.
    • provenAt is that time, expiresAt the day the certificate of the last covering timestamp expires, and documentTimestampedAt the time of the last trusted document timestamp added after the signature. Each is a point in time, named as the API names them everywhere: an ISO 8601 string ending in At.
    • missing says what stands in the way, one { certificate, reason } per certificate: 'no-timestamp', 'untrusted', 'no-answer' or 'revoked'.
    • It agrees with Acrobat's "LTV enabled" line on each of the 32 signatures Acrobat judged in the repository's fixtures.

    A path may pass through the certificates the file holds. A signature that leaves an issuer's certificate out of its CMS is 'trusted' when the document's validation data has it.

    validateChain()'s verdict has withoutIssuer: the certificate whose issuer wasn't found, when that is why a path isn't trusted.

    New exported types: AppliedValidationTime, LongTermVerdict, LongTermGap, LongTermGapReason, RevocationVerdict, AddValidationInfoOptions, AddValidationInfoResult, HttpRevocationSourceOptions, RevocationRouteRequest.

    A test certificate authority. createTestCertificateAuthority() is a throwaway authority for tests and demos. authority.issueSigner() gives a signer whose certificate chains to authority.certificate and names where to ask about it. authority.revocation answers those questions from memory, as a real authority answers them over HTTP: an OCSP response signed by a responder the authority certified, and a CRL. authority.revoke(signer, { at, reason }) withdraws a certificate, and both answers say so from then on. OpenSSL verifies its answers.

    Asking an authority. RevocationSource is where revocation answers come from: one method, fetch(request), that returns the bytes answering a RevocationRequest (an OCSP request for a responder, or an address to fetch a CRL or an issuer's certificate from). RevocationReason names why a certificate was withdrawn.

    A document timestamp only from an authority you trust. sign(doc, { kind: 'timestamp', key, timestampTrust }) refuses a token from an authority timestampTrust doesn't cover, as it does for a signature's own timestamp, and leaves nothing signed. Before, timestampTrust with a document timestamp failed with InvalidArg.

    Certificates that can't be withdrawn. A signing service that issues a certificate for one signature, valid for minutes, runs no revocation service for it, and the certificate says so in an extension: "validity assured, short term" (ETSI EN 319 412-1) or noRevAvail (RFC 9608). Such a certificate needs no answer: revocation reads 'good' when the certificates above it do, longTerm counts nothing as missing for it, and addValidationInfo() asks nobody about it. The extension counts on a certificate that issues nothing, and noRevAvail doesn't count beside an address to ask at. createTestCertificateAuthority()'s issueSigner({ unrevocable }) issues one, with 'validity-assured' or 'no-rev-avail' (Unrevocable).

  • #1092 by @bobsingor – pkijs 4 and asn1js 4. Both are ES modules only and no longer use pvtsutils, the one CommonJS module this package brought along. An Angular production build no longer warns that pvtsutils is not ESM, and an allowedCommonJsDependencies entry for it can go.

    CommonJS works as before. require() does not load an ES module on every Node, or in Jest, so the CommonJS files of this package hold the two libraries and the three they use.

    • require('@embedpdf/core-signature') loads no ES module, and neither does a package that loads it. Jest in its CommonJS mode needs no configuration.
    • The type declarations for CommonJS hold the libraries' types, so TypeScript that compiles to CommonJS reads them with any module setting.
    • dist/THIRD-PARTY-NOTICES.txt lists what the files hold, with each version and license, and inlinedDependencies in package.json has the versions.
    • The CommonJS files are about 930 kB, where they were 180 kB. The ES module files import the libraries as before.

    In Node, the two libraries ask for Node 22.12 or newer, or 20.19 or newer on Node 20. npm warns when it installs them on an older one.

    A time from 2050 on is written as GeneralizedTime. A signing time (subFilter: 'adbe.pkcs7.detached'), and the dates of the certificates and revocation lists this package makes, were always written as UTCTime, which ends with the year 2049: a signing time in 2050 was written as 1950. RFC 5652 and RFC 5280 have a later time as GeneralizedTime. Times are written to the second.

  • #1087 by @bobsingor – Signature timestamps (PAdES B-T): a signature can carry an RFC 3161 token from a timestamp authority, and a reader says what that token is worth.

    Signing. sign() takes timestampAuthority: the signature then carries a timestamp from that authority, stored inside the signature. A timestamp that can't be had fails the signing, so nothing is signed without it. timestampTrust refuses a token from an authority that trust port doesn't cover. With a timestampAuthority, sign() reserves 16384 bytes for the signature unless contentsSizeBytes says otherwise. httpTimestampAuthority({ url }) is an authority reached over HTTP, for a signature's timestamp and for a document timestamp. It tries again only when no answer came, and every error it raises carries the authority's address in details.authority.

    Two steps. completeSignature(doc, { prepared, cms }) is the second half of sign(): it checks the CMS against what was prepared, adds the timestamp when asked, and completes. A failure leaves the signing prepared. attachSignatureTimestamp({ cms, authority }) adds a timestamp to a finished CMS and leaves every other byte of it as it was, also for a CMS written with indefinite lengths.

    Reading. validateSignatures() reports each signature's timestamp in verdict.timestamp: whether the token checks out and stamps this signature, whether its authority is trusted and made for timestamping, the time it vouches for, and the authority's name. It never changes the signature's summary. A document timestamp reads back with a real verdict, where it read indeterminate. validationTime: { kind: 'earliest-timestamp' } judges each certificate at the earliest trusted timestamp that covers what it signed, and now when there is none. verifyTimestampToken() checks a token over any digest.

    Trust. TrustPort takes an optional timestampAnchors(): the certificates trusted for timestamp authorities, apart from anchors(), the ones trusted for signers. Signer trust is judged on the certificate that signed: validateChain(), and validateSignatures() through it, validated whichever certificate the CMS carried last, so a signature whose own certificate led nowhere could read trusted when another certificate in the same CMS reached an anchor, and an expired signer could pass on the dates of its issuers. A missing issuer is named in the reason.

    Checks that changed. Certificate bindings are read in every form: the SHA-1 signing-certificate attribute, and signing-certificate-v2 with SHA-384 or SHA-512 beside SHA-256. A document timestamp whose token uses one of them completes where it was refused; a signature whose binding names another certificate is invalid where a SHA-1 binding was ignored; a binding with an unknown hash reads unsupported. A document timestamp token that binds no certificate at all is refused at completion. The completion gate checks a timestamp a CMS already carries: one that provably stamps something other than the signature is refused. When a signature doesn't fit the room reserved for it, the refusal names the contentsSizeBytes to prepare with.

    Also. A CMS key may declare a hash, which sign() takes as its default digest. ecdsaRawFromDer() turns the DER ECDSA signature most signing services return into the r || s a raw key returns. createTestTimestampAuthority() signs with a certificate made for a timestamp authority, so validators such as OpenSSL accept its tokens.

Patch Changes

  • #1094 by @bobsingor – The serial number of a certificate or a timestamp token this package makes is always DER. It was eight random bytes with only the top bit cleared, so about one in 256 began with a zero byte that DER leaves out, and a strict reader refused it: OpenSSL can't decode such a certificate. personalSigner(), createTestSigner() and createTestTimestampAuthority() made them that way.

    A certificate that a personal key store already holds keeps the serial number it has. store.remove(subject) has the next personalSigner() make a new one.

  • #1090 by @bobsingor – A PKCS#7 signature's signed attributes are in DER order. sign(doc, { subFilter: 'adbe.pkcs7.detached' }) wrote its signed attributes, and signed them, in the order content type, message digest, signing time. DER puts the signing time before the message digest, and RFC 5652 has the signature made over the attributes in DER. They are now sorted before they are signed, so a reader that encodes them again before it checks the signature gets the bytes that were signed.

    • The default, 'ETSI.CAdES.detached', was in DER order already, and so was the test timestamp authority's token.
    • A signature made before still verifies here: it is checked over the order it was written in.

@embedpdf/engine-core@3.3.0

Minor Changes

  • #1093 by @bobsingor – An analysis URL names the server's analysis engine value, and no policy number.

    • encodeAnalysisToken() no longer writes policy, and decodeAnalysisToken() reads past one. AnalysisToken.policyVersion is deprecated and ignored; it goes in 4.0.
    • analysisQueryString() no longer writes policy. It takes engine, the server's analysis value, and writes it as a query parameter.
    • VersionAnalysisQuerySchema has engine in place of policy.
    • wirePaths.layerVersionSignatures() takes engine, the server's signatures value, and writes it as a query parameter. VersionSignaturesQuerySchema is its query.

    SIGNATURE_POLICY_VERSION and policyVersion on an analysis are as they were.

  • #1088 by @bobsingor – Read and store the validation data of a document, timestamp a document with no field made first, and judge two cases the way Acrobat does.

    doc.signatures.getValidationInfo() and doc.signatures.addValidationInfo(). A PDF keeps what a reader needs to check its signatures later with no network in its document security store (/DSS): certificates, OCSP responses and CRLs.

    • getValidationInfo() returns them as { certificates, ocspResponses, crls }, each entry as DER bytes, once. It reads the document as it is now, so an entry that was added and not yet saved is among them. It needs doc.forms.read.
    • addValidationInfo(input) stores entries and returns { added, meta }, where added counts the new ones of each kind. An entry the document already holds, byte for byte, is not stored again.
      • Each entry must be one DER object of at most 16 MiB (VALIDATION_INFO_LIMITS.entryBytes). Otherwise the call fails with InvalidArg, details.field names the entry, and nothing is stored. What an entry says is not checked.
      • It is a change of the document: it is in the file at the next save, as a revision after the signatures, and a signature made after it seals it in. It has no undo (meta.undoable is false), and undoing another change leaves it in place.
      • It needs doc.sign. After a certification that allows no changes it fails with ProtectedDocument.
      • It fires signatures.validationInfoAdded, with added, when it stored something.
    • New exports: the types ValidationInfo, ValidationInfoAddResult, ValidationInfoCounts and ValidationInfoKind, VALIDATION_INFO_KINDS, VALIDATION_INFO_LIMITS, and validationInfoEntryProblem(), which says why bytes are not an entry the engine stores.

    A document timestamp needs no field. doc.signatures.prepare({ kind: 'timestamp' }) may leave field out: the engine then makes a signature field for it, with a name no other field has (Timestamp1, Timestamp2, and so on) and one widget of no size on the first page, in the same revision as the timestamp. SignaturePrepareInput.field is optional for that reason, and SignaturePrepared.field names the field the engine made. A signature with no field fails with InvalidArg. It needs doc.sign, not the right to sign a group's fields.

    A certification that allows no changes (permission: 1) allows no later revision. The PDF standard lets validation data and a document timestamp follow one, and the engine did too. Acrobat reports such a certification as invalid once anything is added, so:

    • analyze() and validateSignatures() read every object written after it as forbidden, with the rule no-changes-certification. Validation data and a document information dictionary read permitted before.
    • The engine refuses signing, a document timestamp included, and metadata changes on such a document, with ProtectedDocument. doc.security.allows('doc.sign') is false there. signedDocumentPolicy: 'permit' still turns the refusals off.
    • A document timestamp that was added after such a certification is judged on its own, as Acrobat judges it: the certification reads changed, the timestamp does not inherit its limit.

    What Acrobat adds to a page no longer reads as a forbidden change because of where the page keeps its annotation list. Acrobat keeps a page's /Annots as an object of its own. A document timestamp, a signature in a new field or a comment added after a signature read forbidden for the earlier signature in three cases, and now read permitted, as they do when the list is an array inside the page:

    • the list moves out of the page into an object of its own, with the new signature field's widget (what Acrobat does the first time);
    • the list already is an object of its own and grows there;
    • the page is pointed at a new list object and the old one stays in the file, unwritten (what Acrobat does for a second timestamp). No later revision holds the old list, so the engine reads it from the earlier revision.

    For that third case an engine hands the rules the objects they ask for: unwrittenObjectsToRead() names them, and StepInput.unwritten carries them (UnwrittenObject). Without them such a page reads forbidden, with a reason that says the earlier list could not be read.

    SIGNATURE_POLICY_VERSION is 5. For a certification at level 2 or 3 and for approval signatures nothing changes.

    On the wire, for the cloud (3.3). @embedpdf/engine-core/wire has the schemas for validation data as base64 (ValidationInfoWireSchema, ValidationInfoAddBodySchema, ValidationInfoAddResultSchema, with encodeValidationInfo() and decodeValidationInfo()), a cached read kind validationInfo with its paths and resource, and VALIDATION_INFO_SINCE, the version these arrived in. A prepare's body may leave field out, and its answer may carry the field the engine made. The worker's answer to a prepare says the object number of the field the signing goes in.

Patch Changes

  • #1080 by @bobsingor – An app that imports @embedpdf/engine builds with Parcel again. The check behind the development warnings read process?.env?.NODE_ENV, which Parcel does not replace: it took it for a use of Node's process and stopped the build with Node builtin polyfill "process/" is not installed. The check now reads process.env.NODE_ENV as written, the expression every bundler replaces.

@embedpdf/engine@3.3.0

Minor Changes

  • #1088 by @bobsingor – Add doc.signatures.getValidationInfo() and doc.signatures.addValidationInfo().

    A PDF keeps what a reader needs to check its signatures later with no network in its document security store: certificates, OCSP responses and CRLs. Acrobat calls a signature whose data is there "LTV enabled".

    const stored = await doc.signatures.getValidationInfo();
    stored.certificates; // DER bytes, one per certificate
    
    const result = await doc.signatures.addValidationInfo({
      ocspResponses: [answer],
    });
    result.added; // { certificates: 0, ocspResponses: 1, crls: 0 }
    • addValidationInfo() stores nothing the document already holds, and nothing at all when an entry is not one DER object (InvalidArg).
    • What it stores is in the file at the next save, as a revision after the signatures, so they still verify. A signature made after it seals it in. It has no undo.
    • It needs doc.sign, and fails with ProtectedDocument after a certification that allows no changes.
    • It fires signatures.validationInfoAdded when it stored something.

    A document timestamp needs no field: doc.signatures.prepare({ kind: 'timestamp' }) with no field makes one for it, with no size, so it shows nowhere on the page. The field is added in the same revision as the timestamp, and prepared.field names it.

    A signature field or document timestamp that Acrobat adds to a page whose annotation list is an object of its own now reads permitted for the earlier signatures, as Acrobat reads it.

Patch Changes

  • #1079 by @bobsingor – localEngine() starts under a dev server that prebundles packages without their files: Vite 7 and older, which includes ng serve in Angular 20 and 21. The engine's worker URL pointed into the dev server's cache folder, where nothing is, so the document never opened. There the engine now starts from blob: workers and a copy of the WebAssembly that only a dev build carries (@embedpdf/engine/dev-wasm). A production build is unchanged. An engine that cannot start now also says so in the console, with the URL it tried.

@embedpdf/engine-services@3.3.0

Minor Changes

  • #1088 by @bobsingor – Read and store a document's validation data, and read a page's earlier annotation list from the file.

    • ValidationInfoReader reads the certificates, OCSP responses and CRLs of the document security store (/DSS), and ValidationInfoMutator stores new ones. The mutator checks every entry before it writes the first, and leaves out an entry the document already holds.
    • The worker host answers two new requests, signatures.validationInfo and signatures.addValidationInfo. The second is a write: it runs in one transaction and has no undo.
    • SignatureAnalyzer reads the objects the rules ask for that a revision did not write, and hands them to the rules. A signature field or timestamp that Acrobat adds to a page whose annotation list is an object of its own now reads permitted for the earlier signature.
    • SignatureMutator.prepare() takes a document timestamp with no field: it makes the field on the signing candidate, so the live document gets it when the signing completes, in the timestamp's own revision, and never when it is cancelled.

    This needs a runtime that has EPDFDss_GetCount, EPDFDss_GetData, EPDFDss_Add and EPDFDoc_GetLoadedObjectValue.

@embedpdf/angular@3.3.0

Minor Changes

  • #1091 by @bobsingor – Each feature entry exports its plugin's commands as a list: stageCommands from /stage, interactionCommands from /interaction, selectionCommands from /selection, annotationCommands from /annotation, historyCommands from /history, renderCommands from /render and documentCommands from /runtime. standardCommands is these lists joined. To leave some commands out, spread the lists you want in place of standardCommands. /interaction also exports toolCommand(id), the command behind tool:<id>, to give a tool of your own a shortcut.

    standardCommands gains history:undo (Mod+Z) and history:redo (Mod+Shift+Z, Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled without withHistory() or while there is nothing to undo or redo. A command of your own with one of these ids still replaces the standard one when it comes after ...standardCommands in the commands setting of withCommands(). With the standard commands in use, registerCommand() with one of these ids now needs { replace: true }.

  • #1088 by @bobsingor – EpdfSignature has addValidationInfo() and canAddValidationInfo(), as the signature plugin does.

Patch Changes

  • #1092 by @bobsingor – A production build no longer warns that pvtsutils is not ESM. The signature package moved to pkijs 4 and asn1js 4, which no longer use it. An allowedCommonJsDependencies entry for pvtsutils can go.

@embedpdf/react@3.3.0

Minor Changes

  • #1091 by @bobsingor – Each feature entry exports its plugin's commands as a list: stageCommands from /stage, interactionCommands from /interaction, selectionCommands from /selection, annotationCommands from /annotation, historyCommands from /history, renderCommands from /render and documentCommands from /runtime. standardCommands is these lists joined. To leave some commands out, spread the lists you want in place of standardCommands. /interaction also exports toolCommand(id), the command behind tool:<id>, to give a tool of your own a shortcut.

    standardCommands gains history:undo (Mod+Z) and history:redo (Mod+Shift+Z, Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled without historyPlugin() or while there is nothing to undo or redo. A command of your own with one of these ids still replaces the standard one when it comes after ...standardCommands in the commands setting of commandsPlugin(). With the standard commands in use, registerCommand() with one of these ids now needs { replace: true }.

@embedpdf/svelte@3.3.0

Minor Changes

  • #1091 by @bobsingor – Each feature entry exports its plugin's commands as a list: stageCommands from /stage, interactionCommands from /interaction, selectionCommands from /selection, annotationCommands from /annotation, historyCommands from /history, renderCommands from /render and documentCommands from /runtime. standardCommands is these lists joined. To leave some commands out, spread the lists you want in place of standardCommands. /interaction also exports toolCommand(id), the command behind tool:<id>, to give a tool of your own a shortcut.

    standardCommands gains history:undo (Mod+Z) and history:redo (Mod+Shift+Z, Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled without historyPlugin() or while there is nothing to undo or redo. A command of your own with one of these ids still replaces the standard one when it comes after ...standardCommands in the commands setting of commandsPlugin(). With the standard commands in use, registerCommand() with one of these ids now needs { replace: true }.

@embedpdf/vue@3.3.0

Minor Changes

  • #1091 by @bobsingor – Each feature entry exports its plugin's commands as a list: stageCommands from /stage, interactionCommands from /interaction, selectionCommands from /selection, annotationCommands from /annotation, historyCommands from /history, renderCommands from /render and documentCommands from /runtime. standardCommands is these lists joined. To leave some commands out, spread the lists you want in place of standardCommands. /interaction also exports toolCommand(id), the command behind tool:<id>, to give a tool of your own a shortcut.

    standardCommands gains history:undo (Mod+Z) and history:redo (Mod+Shift+Z, Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled without historyPlugin() or while there is nothing to undo or redo. A command of your own with one of these ids still replaces the standard one when it comes after ...standardCommands in the commands setting of commandsPlugin(). With the standard commands in use, registerCommand() with one of these ids now needs { replace: true }.

@embedpdf/plugin-annotation@3.3.0

Minor Changes

  • #1091 by @bobsingor – The annotation plugin ships its own command: createAnnotationCommands() makes the list with annotation:delete. It comes from a new @embedpdf/plugin-annotation/commands entry. It is the command @embedpdf/plugin-commands/standard held, unchanged. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as annotationCommands.

    The tools the plugin registers say whether the user may use them (canUse() on the interaction plugin's Tool): only a user who may create annotations. So tool:<id> shows disabled without that permission, as before, and the tool commands no longer ask the annotation plugin.

  • #1096 by @bobsingor – A pen or highlighter drawing is no longer lost when something else happens right after a stroke. After a stroke the pen waits a moment for the next stroke of the same drawing. Pressing another annotation in that moment dropped the stroke, and so did starting a marquee selection, opening a text box for typing, deleting the selection, and creating a markup from code. Now the stroke becomes an annotation first, and a press selects only what it hit. Fixes #1062.

    Picking another tool during that wait keeps the tool you picked: with afterCreate.tool: 'default' the viewer went back to the default tool instead. finishInkDraft() on the host capability now leaves a stroke that is still being drawn alone.

    A polygon, a polyline or a callout that is being drawn keeps its next click when that click lands on another annotation: the click places the point, where it selected that annotation and dropped the shape. The distance tool already worked this way. While such a shape is being drawn, the pointer keeps the tool's cursor over an annotation. hasCreationAwaitingClick() on the host capability says whether a shape waits for such a click.

@embedpdf/plugin-commands@3.3.0

Minor Changes

  • #1091 by @bobsingor – createStandardCommands() in @embedpdf/plugin-commands/standard is deprecated. It keeps returning the commands it had in 3.2, now joined from the lists their plugins ship (createStageCommands() in @embedpdf/plugin-stage/commands, and so on), and nothing new joins it. Spread your framework package's standardCommands, or the lists you need. The command types (CommandDefinition, CommandFamily, CommandContext, IconAccent) are re-exported from @embedpdf/core, where they live now.

@embedpdf/plugin-history@3.3.0

Minor Changes

  • #1091 by @bobsingor – The history plugin ships undo and redo as commands: createHistoryCommands() makes the list of history:undo (Mod+Z) and history:redo (Mod+Shift+Z, Mod+Y). It comes from a new @embedpdf/plugin-history/commands entry. They stay disabled while there is nothing to undo or redo. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as historyCommands, and it is part of standardCommands.

@embedpdf/plugin-i18n@3.3.0

Minor Changes

  • #1089 by @bobsingor – EmbedPDF's own strings gain commands.history.undo and commands.history.redo, the labels of the standard undo and redo commands, in all eight languages.

@embedpdf/plugin-interaction@3.3.0

Minor Changes

  • #1091 by @bobsingor – The interaction plugin ships the tool commands: createInteractionCommands() makes the list of tool:pointer, tool:pan, tool:zoom and tool:<id> for every other tool, and toolCommand(id) is the command behind tool:<id>, to build a tool's own command on. They come from a new @embedpdf/plugin-interaction/commands entry. They are the commands @embedpdf/plugin-commands/standard held, unchanged. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as interactionCommands.

    A tool can say whether the user may use it: Tool gains an optional canUse(), and the plugin canUseTool(id), which is true for a tool without one and false for an id that isn't registered. The tool commands show disabled while it says no. Switching to a tool doesn't ask.

@embedpdf/plugin-render@3.3.0

Minor Changes

  • #1091 by @bobsingor – The render plugin ships the snapshot's commands: createRenderCommands() makes the list of tool:snapshot, snapshot:copy, snapshot:save and snapshot:clear, and takes the browser's clipboard write and file download as an argument. It comes from a new @embedpdf/plugin-render/commands entry. They are the commands @embedpdf/plugin-commands/standard held, unchanged. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as renderCommands.

@embedpdf/plugin-selection@3.3.0

Minor Changes

  • #1091 by @bobsingor – The selection plugin ships its own command: createSelectionCommands() makes the list with selection:copy, and takes the browser's clipboard write as an argument. It comes from a new @embedpdf/plugin-selection/commands entry. It is the command @embedpdf/plugin-commands/standard held, unchanged. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as selectionCommands.

@embedpdf/plugin-signature@3.3.0

Minor Changes

  • #1088 by @bobsingor – Verdicts say whether a certificate was withdrawn and whether the file is "LTV enabled", and a signature is judged at its timestamp by default.

    • Every verdict from validate() and validateField() carries revocation ('good', 'revoked' or 'unknown', with revocationReason) and longTerm ({ enabled, provenAt, expiresAt, documentTimestampedAt, missing }), read from the answers the file holds. A signer you trust whose certificate is proven withdrawn reads 'invalid'.
    • validate() and validateField() judge each certificate at the earliest trusted timestamp that covers what it signed, and as of now when there is none. A signature whose signer's certificate expired after it was signed, and that carries a timestamp from an authority you trust, reads 'valid' where it read 'valid-untrusted'. Pass validationTime: { kind: 'now' } to judge every certificate as of now.
    • A verdict's validationTime names a timestamp's time stampedAt. genTime, its name until now, is there beside it and is still taken by validate(), until 4.0. AppliedValidationTime, the type of what a verdict reports, comes with the plugin's exports.

    Signatures that stay checkable. Two settings and two methods keep what the plugin seals checkable with no network.

    • revocation is where revocation answers come from, such as httpRevocationSource({ url }). With it, every signature the plugin seals gets its validation data right after: the answers that say its certificates were good at its timestamp, stored in the file. It needs trust. documentTimestamp: true then adds a document timestamp from timestampAuthority.
    • The signature is sealed first, so a failure afterwards can't undo it. sign(), completeSignature() and placeMark() still resolve, and the result says what happened: validationInfo is { added, documentTimestamp }, or null when nothing was to be added, and validationInfoError is the error that kept the data or the document timestamp out, or null.
    • Only the signature just made is covered. A session without doc.sign, such as a signer of one group's fields, signs without the follow-up.
    • addValidationInfo(field?) does the same for a signed field, or for every signature, and rejects when one can't be covered. canAddValidationInfo() says whether it can: the revocation and trust settings, and doc.sign.
    • The verdicts are read again when anyone adds validation data to the document. Checking asks nobody: only what the file holds counts.
    • httpRevocationSource and createTestCertificateAuthority come with the plugin's exports, beside the signers.
  • #1087 by @bobsingor – The timestampAuthority setting: every signature the plugin seals then carries a timestamp from that authority, in one step and in two, and a timestamp that can't be had fails the signing. sign() and prepareSignature() take a per-call timestampAuthority; null seals that one without a timestamp. With the trust setting set, a timestamp from an authority it doesn't cover is not sealed.

    completeSignature() checks the CMS against what was prepared before it seals anything, where it handed it to the engine as it was: a CMS that doesn't sign the prepared digest is refused instead of written. When it fails, the signing stays prepared, to complete again or to cancel.

    validate() takes validationTime: { kind: 'earliest-timestamp' }, and a verdict carries its signature's timestamp in timestamp. httpTimestampAuthority and createTestTimestampAuthority come with the plugin's exports, beside the signers.

Patch Changes

  • #1090 by @bobsingor – A PKCS#7 signature's signed attributes are in DER order. With subFilter: 'adbe.pkcs7.detached' the signing time was written after the message digest, where DER puts it before. A reader that encodes the attributes again before it checks the signature now gets the bytes that were signed. Signatures made before still verify.

@embedpdf/plugin-stage@3.3.0

Minor Changes

  • #1091 by @bobsingor – The Stage ships its own commands: createStageCommands() makes the list of zoom, the page moves and view rotation. It comes from a new @embedpdf/plugin-stage/commands entry. They are the commands @embedpdf/plugin-commands/standard held, unchanged. The entry reads the plugin through its contract, so the list brings no plugin code with it. Each framework package has the list ready as stageCommands.

@embedpdf/plugin-stamp@3.3.0

Minor Changes

  • #1039 by @bobsingor – importLibrary(bytes, { id }) imports a library under the id you give it, over the one the file names, so its stamps have ids you know ahead (<id>:<name>). A taken id still gets a fresh one.

@embedpdf/viewer-chrome@3.3.0

Minor Changes

  • #1039 by @bobsingor – plugins.stamp.libraries gives the viewer your own stamp libraries, each { id, url } or { id, data }: loaded when the viewer starts, never stored in the browser, listed in the stamps panel without a way to remove them, and named in quick as <id>:<name>. Quick stamps in the Insert toolbar now show at the button's full height, so a wide stamp no longer shrinks to a few pixels. A stamp library of your own as the standard stamps (plugins.stamp.standard: '/my-stamps.pdf') is no longer stored in the browser: it went in under the id its file names, or a fresh one for a file that names none (an Acrobat stamp file), so it was stored and imported again beside the stored copy on every visit. It now goes in under the standard id, like the copy that ships, so standard:<name> in quick finds its stamps. Copies already stored stay in the stamps panel, where each can be removed. Fixes #1084.

  • #1088 by @bobsingor – The signature inspector says how a signature will hold up. A Revocation line shows when the file holds an answer about the signer's certificate: not revoked, or revoked. A Long-term validation line says whether the file holds everything a reader needs to check the signature with no network: enabled, with the day that proof runs out, or not enabled, with what is missing. For a signature that isn't enabled, Add verification information asks for the answers and stores them, when the revocation and trust settings are set and the person may sign.

    When a signature is sealed and its verification information can't be added, the sign dialog and the signatures panel say so: the document is signed, and the inspector offers to add it later.

    The details of a signature whose box has no size, such as a document timestamp's, open at the corner of the viewer and no longer at a point on the page.

    Seventeen new strings, in all fifteen languages. httpRevocationSource and createTestCertificateAuthority are exported beside the signers.

  • #1087 by @bobsingor – The signature inspector shows a signature's timestamp: the time its timestamp authority vouches for and the authority's name, in the tone of the timestamp's verdict. When a signing fails at its timestamp, the sign dialog says so in the viewer's language: the timestamp service did not answer, or it refused. Three new strings, in all fifteen languages. httpTimestampAuthority and createTestTimestampAuthority are exported beside the signers.

@embedpdf/viewer@3.3.0

Minor Changes

  • #1039 by @bobsingor – plugins.stamp.libraries gives the viewer your own stamp libraries, each { id, url } or { id, data }, such as a check mark and a cross for ticking off a printed form: loaded when the viewer starts, never stored in the browser, and named in quick as <id>:<name> to show in the Insert toolbar. Quick stamps now show at the button's full height, so a wide stamp no longer shrinks to a few pixels. The StampLibraryFile type describes one library. A stamp library of your own as the standard stamps (plugins.stamp.standard: '/my-stamps.pdf') no longer shows up once more in the stamps panel on every visit: it is never stored in the browser now, like the copy that ships, and standard:<name> in quick finds its stamps. Copies already stored stay in the panel, where each can be removed. Fixes #1084.

  • #1088 by @bobsingor – plugins.signature.revocation keeps every signature the viewer seals checkable with no network: its validation data is stored in the file right after the seal. plugins.signature.documentTimestamp adds a document timestamp after it. httpRevocationSource and createTestCertificateAuthority are exported beside the signers.

  • #1087 by @bobsingor – plugins.signature.timestampAuthority gives every signature the viewer seals a timestamp. httpTimestampAuthority and createTestTimestampAuthority are exported beside the signers, so the authority comes from the same import as the key.

Patch Changes

  • #1092 by @bobsingor – An Angular production build of an app with the viewer no longer warns that pvtsutils is not ESM. The signature package moved to pkijs 4 and asn1js 4, which no longer use it. An allowedCommonJsDependencies entry for pvtsutils can go.

@embedpdf/plugin-form@3.3.0

Patch Changes

  • #1088 by @bobsingor – A widget whose box has no size shows nowhere, and is now treated that way. This is how a PDF keeps an invisible signature and the field of a document timestamp. Tab no longer stops at it, focus() answers false for its field, it gets no fill control, and in design mode it is not lent to the annotation tools, so a click or a marquee can no longer select it.

@cloudpdf/web@3.3.0

@cloudpdf/plugin-protected-display@3.3.0

@cloudpdf/server-modules@3.3.0

@cloudpdf/viewer-angular@3.3.0

@cloudpdf/viewer@3.3.0

@cloudpdf/viewer-react@3.3.0

@cloudpdf/viewer-svelte@3.3.0

@cloudpdf/viewer-vue@3.3.0

@embedpdf/core-acrojs@3.3.0

@embedpdf/core-fonts@3.3.0

@embedpdf/core-form@3.3.0

@embedpdf/core-geometry@3.3.0

@embedpdf/core-js-sandbox@3.3.0

@embedpdf/core-stage@3.3.0

@embedpdf/core-text@3.3.0

@embedpdf/core-ui@3.3.0

@embedpdf/engine-runtime@3.3.0

@embedpdf/engine-runtime-darwin-arm64@3.3.0

@embedpdf/engine-runtime-darwin-x64@3.3.0

@embedpdf/engine-runtime-linux-arm64@3.3.0

@embedpdf/engine-runtime-linux-x64@3.3.0

@embedpdf/engine-runtime-linuxmusl-arm64@3.3.0

@embedpdf/engine-runtime-linuxmusl-x64@3.3.0

@embedpdf/engine-runtime-wasm32@3.3.0

@embedpdf/engine-runtime-win32-arm64@3.3.0

@embedpdf/engine-runtime-win32-x64@3.3.0

@embedpdf/web@3.3.0

@embedpdf/plugin-actions@3.3.0

@embedpdf/plugin-attachment@3.3.0

@embedpdf/plugin-fonts@3.3.0

@embedpdf/plugin-link@3.3.0

@embedpdf/plugin-measurement@3.3.0

@embedpdf/plugin-metadata@3.3.0

@embedpdf/plugin-outline@3.3.0

@embedpdf/plugin-page-edit@3.3.0

@embedpdf/plugin-redaction@3.3.0

@embedpdf/plugin-search@3.3.0

@embedpdf/plugin-shell@3.3.0

@embedpdf/plugin-view-manager@3.3.0

@embedpdf/viewer-angular@3.3.0

@embedpdf/viewer-react@3.3.0

@embedpdf/viewer-svelte@3.3.0

@embedpdf/viewer-vue@3.3.0

Don't miss a new core release

NewReleases is sending notifications on new releases.