embedpdf/embed-pdf-viewer
 Watch   
 Star   
 Fork   
8 days ago
embed-pdf-viewer

Release v3.3.0

@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

13 days ago
embed-pdf-viewer

Release v3.2.0

@cloudpdf/contract@3.2.0

Minor Changes

  • #1071 by @bobsingor – The contract has the change op annotations.copy (refs, page, offset, objectNumbers) and its result item (annotations, refMap, dropped, meta). openapi.json describes both.

  • #1075 by @bobsingor – The contract has the change op forms.copy (fields, widgets, page, offset, values, objectNumbers) and its result item (fields, widgets, refMap, dropped, calculationOrder, meta). openapi.json describes both.

@cloudpdf/engine@3.2.0

Minor Changes

  • #1071 by @bobsingor – The cloud engine has doc.annotations.copy(refs, { page?, offset?, objectNumbers? }), and doc.apply takes the op annotations.copy. The copies are made on the server in one request, so nothing is downloaded. Against a server older than 3.2 the change is refused with NotImplemented before anything is sent.

  • #1056 by @bobsingor – The cloud engine works with a server that is older or newer than it for change kinds. A change with a kind of op the server doesn't have yet is refused on its own, before anything is sent, with NotImplemented; its details name the op (kind), the version that has it (needs) and the server's (serverVersion). The changes called beside it still go out. A change from another session of a kind this version doesn't know now reads as stream.desynced with reason: 'unknown-change', so everything is read again; before, it became an event without a type and reads stayed stale.

  • #1075 by @bobsingor – The cloud engine has doc.forms.copy(fields, { page?, offset?, values?, widgets?, objectNumbers? }), and doc.apply takes the op forms.copy. The copies are made on the server in one request. Against a server older than 3.2 the change is refused with NotImplemented before anything is sent.

@cloudpdf/sdk@3.2.0

Minor Changes

  • #1071 by @bobsingor – The SDK has the change op annotations.copy and its result item: ChangeOp.AnnotationsCopy and ChangeItem.AnnotationsCopy.

  • #1075 by @bobsingor – The SDK has the change op forms.copy and its result item: ChangeOp.FormsCopy and ChangeItem.FormsCopy.

@cloudpdf/server@3.2.0

Minor Changes

  • #1071 by @bobsingor – POST …/changes takes the new op annotations.copy: copies of annotations in the same document, with a stamp's drawing and an attachment's file copied on the server. It needs doc.annotate.read and the right to create each kind, not doc.download. A ref the document doesn't have refuses the change with NotFound. On the event stream, a client that says a version before 3.2 gets full-refresh in place of a change with this op. A copy stays within the server's bundleLimits: past one, its change is refused with PayloadTooLarge, and details.limit names the limit.

  • #1056 by @bobsingor – The event stream answers each client as its version reads. A change with a kind that arrived after the client's EmbedPDF-Version goes out as full-refresh in the row's place, and the stream carries on with the rows after it; a full-refresh now says why in its data (reason). An op of POST …/changes with a field the server doesn't know refuses the request with InvalidArg, naming the field, where the field used to be dropped and the op applied without it. An item of a kind the server doesn't know is withheld from a connection that may not read everything.

  • #1075 by @bobsingor – POST …/changes takes the new op forms.copy: a new field from each field named, with its widgets, made on the server. It needs doc.forms.modify, and doc.forms.script to keep scripts, submits and links. A field the form doesn't have refuses the change with NotFound. On the event stream, a client that says a version before 3.2 gets full-refresh in place of a change with this op. A copy stays within the server's bundleLimits: more fields than items refuses its change with PayloadTooLarge.

@embedpdf/core-annotation@3.2.0

Minor Changes

  • #1071 by @bobsingor – New isMovable(record): whether an annotation is one people move at all. Its kind moves, and it isn't bound to text, as a highlight or a redaction of words is. canMove(model, id) uses it, and adds the lock, the session's rights and its editable rule.

@embedpdf/core@3.2.0

Minor Changes

  • #1054 by @bobsingor – A plugin can stage a change that one of the engine's own verbs makes, such as an import: ctx.changes.stage({ label, send }). The queue calls send(doc, { opId }) when it sends the change, so the verb keeps its place among the other changes, and the history records it as one step. opId names the change when the caller of the verb chose an id, and history: false keeps it out of the history. The new HistoryOptions type is the history?: false option a verb takes from its caller.

Patch Changes

  • #1056 by @bobsingor – The page list is read again when the event stream skipped events (stream.desynced). A page inserted or deleted by someone else while a viewer was too far behind used to show only after the document was opened again.

@embedpdf/engine-core@3.2.0

Minor Changes

  • #1071 by @bobsingor – New change op annotations.copy, and doc.annotations.copy(refs, { page?, offset?, objectNumbers? }) for it: copies of annotations inside one document, made as one change that one undo takes away. A copy carries every field of its kind, locked included, and a stamp's drawing or an attachment's file, so doc.download isn't needed. It gets its own ref and a fresh nm, and the session is its author. Links between copies stay: a reply to an annotation that is copied too replies to that one's copy, so a copied group is a group of its own. The result holds the copies, refMap and dropped, with the reasons an import uses. planAnnotationCopies(sources, placement) is the rule itself, without zod, for a viewer that shows the copies before the engine answers. The op arrived in 3.2 (CHANGE_KIND_SINCE), so an older server is never sent it and an older client reads everything again. runAnnotationCopyConformance checks an engine against it. A copy stays within the bundle limits (items, resources, resourceBytes and bundleBytes); past one it is refused with PayloadTooLarge, and details.limit names the limit.

  • #1056 by @bobsingor – Every kind of change op and result item says the version it arrived in, so a client and a server of different versions can tell which kinds the other has. CHANGE_KIND_SINCE lists the kinds that arrived after 3.0 (pages.setScale in 3.1), changeKindsUnknownTo(version, kinds) names the kinds a side of that version lacks, and lacksWhatArrivedIn(version, since) makes the comparison for anything else that arrived in a version. stream.desynced has a second reason, 'unknown-change': a change of a kind this version doesn't know arrived. Each op of a POST …/changes request is now strict about its own fields: an op with a field the schema doesn't name is refused, where the field used to be dropped.

  • #1075 by @bobsingor – New change op forms.copy, and doc.forms.copy(fields, { page?, offset?, values?, widgets?, objectNumbers? }) for it: a new field from each field named, made as one change that one undo takes away. A copy has its source's settings, scripts and default value, and each widget's place, look, flags and actions, moved by offset or put on page. It is named after its source with the next free number (email becomes email_2, billing.name becomes billing.name_2), and it has its source's value unless values is false; a signature never comes along. widgets names the widgets to copy when it isn't all of them. The result holds the new fields, their widgets, refMap and dropped, with the reasons a form import uses, and its events are one forms.created per field. planFormCopies is the rule itself, without zod, for a viewer that shows the copies before the engine answers; copyNameOf and fieldNameTaken name a copy. The op arrived in 3.2 (CHANGE_KIND_SINCE), so an older server is never sent it and an older client reads everything again. runFormCopyConformance checks an engine against it. A form import and a copy now also carry a widget's check style and its dash pattern. fields names at most as many fields as the bundle limits' items; more is refused with PayloadTooLarge, and details.limit names the limit.

  • #1049 by @bobsingor – An annotation update can change nm. A new name renames the annotation in place, and nm: null removes its name. A new name must be free on its page, checked against the page as the change's earlier ops left it; an undo puts back the name the annotation had. The conformance suites check renames, and runChangeConformance's open option takes the PDF to open, such as NAMES_FIXTURE_PDF, a file with missing and shared names.

@embedpdf/engine@3.2.0

Minor Changes

  • #1071 by @bobsingor – The local engine has doc.annotations.copy(refs, { page?, offset?, objectNumbers? }): copies of annotations in the same document, as one change that one undo takes away. In a change of your own it is the op annotations.copy.

  • #1075 by @bobsingor – The local engine has doc.forms.copy(fields, { page?, offset?, values?, widgets?, objectNumbers? }): a new field from each field named, as one change that one undo takes away. In a change of your own it is the op forms.copy.

@embedpdf/engine-services@3.2.0

Minor Changes

  • #1071 by @bobsingor – The worker applies the new op annotations.copy. It reads each named annotation, creates the copies as one change, all or nothing, and records the reverse, so an undo deletes them. A copied stamp places the drawing its original places, so the document gets no second drawing, and a copied attachment gets the same file bytes with its dates. Every create is checked before the first write: the session needs doc.annotate.read and the right to create each kind. A copy carries what a bundle may: as many annotations, and as many drawings and files, of that size each and together. A drawing counts once however many copies place it. Past a limit the copy is refused with PayloadTooLarge before anything is written. document.applyChanges takes the deployment's limits; without them the defaults apply.

  • #1075 by @bobsingor – The worker applies the new op forms.copy. It reads the form, plans the copies before the first write, and creates each new field as a design import creates one: with its widgets, their flags, its value when asked, and its place in the calculation order. Its reverse deletes the fields it made, the last first. It needs doc.forms.modify; a script, a submit or a link is left out and reported without doc.forms.script. A copy names at most as many fields as the bundle limits' items; more is refused with PayloadTooLarge before the form is read.

  • #1049 by @bobsingor – annotations.update and forms.updateWidget write a new nm to the annotation's own /NM, or remove it for null. The object, its replies, its appearance and its other keys stay as they are. A name another annotation on the page has is refused with InvalidArg. An empty name removes /NM, as a create given one writes none.

@embedpdf/angular@3.2.0

Minor Changes

  • #1071 by @bobsingor – EpdfAnnotation has duplicate(refs, options), canDuplicate(refs), isMovable(ref), selection.duplicate(options) and selection.canDuplicate().

  • #1075 by @bobsingor – EpdfForm has duplicate(fields, options) and duplicateWidgets(widgets, options).

Patch Changes

  • #1074 by @bobsingor – <epdf-form-layer> draws a field's picture where the field is now. A field that was moved, in Form design or with updateWidget(), kept its picture at the old place until the page's pictures were loaded again: the field showed in one place and took clicks in another.

@embedpdf/web@3.2.0

Minor Changes

  • #1051 by @bobsingor – The Stage's wheel handling asks the Stage whether a wheel is its own, through the host's new wheelBy, and cancels only the wheels the Stage takes. A wheel the Stage leaves alone reaches the browser, which scrolls the page around the viewer with it. A zoom wheel (Ctrl or Cmd) is always cancelled. A wheel event that isn't cancelable is ignored: the browser is already scrolling the page with it. A test that sends its own wheel events needs cancelable: true on them.

@embedpdf/plugin-annotation@3.2.0

Minor Changes

  • #1071 by @bobsingor – New duplicate(refs, { page?, offset?, select? }) copies annotations in the same document. The copies show at once, it is one step to undo, labelled annotation.duplicate, and it resolves { annotations, dropped }. A stamp keeps its drawing and an attachment its file, with nothing to download, and an annotation keeps its link. selection.duplicate({ offset? }) copies the selection 10 points right and down, or left or up near the page's edge, and selects the copies. canDuplicate(refs) and selection.canDuplicate() are false without the right to create and for a locked annotation, whose copy would be locked too; code can still copy one. isMovable(ref) says whether an annotation is one people move: false for one that sits on text, such as a highlight. Past the engine's bundle limits (10,000 annotations by default) duplicate() is refused with invalid-input, and nothing is copied.

  • #1075 by @bobsingor – selection.duplicate() copies a form's widgets too, in design mode: their owner says how (a radio button's copy joins its group, any other widget's is a new field), and the copies are made in the same change as the annotations', so a selection of both is one step to undo. selection.canDuplicate() asks the owner for them. duplicate(refs) still refuses a widget. For a plugin that lends records (AnnotationLender): copyOps(refs, placement) gives the ops that copy its records, and getAuthority() also says copy.

  • #1054 by @bobsingor – import() is now one step to undo: an undo takes away every annotation the import added, and a redo brings them back under the same refs. It is sent after the changes staged before it, typed text included. An app that imports by itself, such as loading stored annotations when a document opens, passes history: false to keep the import out of undo and redo: annotation.import(bundle, { history: false }).

@embedpdf/plugin-form@3.2.0

Minor Changes

  • #1075 by @bobsingor – New duplicate(fields, { page?, offset?, values? }) copies whole fields: each copy is a new field named after its original (email_2), with its settings, scripts and widgets, and no answer unless values is true. New duplicateWidgets(widgets, options) copies widgets as Duplicate does in a form designer: a radio button's copy is another button of its group, with the next free Choice<n>, and any other widget's copy is a new field; widgets of one field copied together become one new field. Both show their copies at once, are one step to undo, and resolve { fields, widgets, dropped }. In design mode the annotation plugin's selection.duplicate() copies the selected widgets through this plugin. addWidget() now shows its new widget before the engine answers. getSelectedField() is also the field when several of its widgets are selected, such as a radio group's buttons. Past the engine's item limit (10,000 fields by default) the call is refused with invalid-input, and nothing is copied.

  • #1054 by @bobsingor – import() is now one step to undo: an undo takes away the fields the import added, and a redo brings them back. An app that adds fields by itself passes history: false to keep the import out of undo and redo: form.import(bundle, { history: false }).

@embedpdf/plugin-stage@3.2.0

Minor Changes

  • #1051 by @bobsingor – A wheel or trackpad scroll over the Stage no longer gets stuck at the end of the pages. A scroll that begins where the pages can't scroll any further the way it pushes now scrolls the page around the viewer, as it does at the end of any scrolling element. A scroll that reaches the end stops there, momentum included, and the next one scrolls the page. On a trackpad the next swipe is the next one, also while the last still coasts. In paged flow a push past the edge still turns the page while there is one to turn to, and on a trackpad every swipe now turns one: a swipe that began while the last one still coasted turned nothing. The new scrollChaining setting is on by default. Set it to false in an app where the viewer fills the window, and the Stage keeps every wheel over it, as before: a sideways swipe the pages can't follow then never reaches the browser's back gesture.

@embedpdf/viewer-chrome@3.2.0

Minor Changes

  • #1071 by @bobsingor – New command annotation:duplicate, with Ctrl/Cmd+D and a button in the bar over a selection. It copies the selected annotations beside the originals and selects the copies, as one step to undo. The button shows for annotations people move, so not for a highlight, and is greyed out while a locked annotation is selected. New icon duplicate and label commands.annotate.duplicate, in all 15 languages.

  • #1075 by @bobsingor – Duplicate (annotation:duplicate, Ctrl/Cmd+D) now copies form fields in Form design: a radio button's copy joins its group as a new choice, and any other field's copy is a new field named after the original. The form design sidebar has Duplicate group for a radio group, which copies the whole group as a new one. New label formDesign.duplicateGroup, in all 15 languages.

Patch Changes

  • #1069 by @TbhVishal – A comment and a reply show their time as well as their day, with the year once it isn't this year's, and the whole date and time in a tooltip. Dates, times and file sizes are written in the language the viewer shows, the way the reader's region writes them: an English viewer reads 14 Sept, 17:30 in a British browser and Sep 14, 5:30 PM in an American one, and a locale that names a region, such as 'en-GB', writes them that way for everyone. A language whose code the browser can't read is written in the browser's own formats.

@embedpdf/default-fallback-fonts@1.0.1

Patch Changes

  • #1070 by @bobsingor – The package's page on npm says what the fonts are and which packages bring them, with the fonts' license notice under it. The notice is a file of the package too, NOTICE.md.

@embedpdf/default-signature-fonts@1.0.1

Patch Changes

  • #1070 by @bobsingor – The package's page on npm shows how to give the three fonts to the stamp plugin, with the fonts' license notice under it. The notice is a file of the package too, NOTICE.md.

@embedpdf/react@3.2.0

Patch Changes

  • #1074 by @bobsingor – <FormLayer> draws a field's picture where the field is now. A field that was moved, in Form design or with updateWidget(), kept its picture at the old place until the page's pictures were loaded again: the field showed in one place and took clicks in another.

@embedpdf/svelte@3.2.0

Patch Changes

  • #1074 by @bobsingor – <FormLayer> draws a field's picture where the field is now. A field that was moved, in Form design or with updateWidget(), kept its picture at the old place until the page's pictures were loaded again: the field showed in one place and took clicks in another.

  • #1073 by @bobsingor – Opening another document while one is shown in a <Stage>, or closing the shown one, no longer throws Cannot read properties of null (reading 'getLensId') (in Safari, null is not an object (evaluating '$$props.stage.getLensId')) and leaves the Stage blank. A page stays readable until its layers are gone: a layer that reads usePage() in a cleanup gets the page as it last was.

@embedpdf/vue@3.2.0

Patch Changes

  • #1074 by @bobsingor – <FormLayer> draws a field's picture where the field is now. A field that was moved, in Form design or with updateWidget(), kept its picture at the old place until the page's pictures were loaded again: the field showed in one place and took clicks in another.

@cloudpdf/web@3.2.0

@cloudpdf/plugin-protected-display@3.2.0

@cloudpdf/server-modules@3.2.0

@cloudpdf/viewer-angular@3.2.0

@cloudpdf/viewer@3.2.0

@cloudpdf/viewer-react@3.2.0

@cloudpdf/viewer-svelte@3.2.0

@cloudpdf/viewer-vue@3.2.0

@embedpdf/core-acrojs@3.2.0

@embedpdf/core-fonts@3.2.0

@embedpdf/core-form@3.2.0

@embedpdf/core-geometry@3.2.0

@embedpdf/core-js-sandbox@3.2.0

@embedpdf/core-signature@3.2.0

@embedpdf/core-stage@3.2.0

@embedpdf/core-text@3.2.0

@embedpdf/core-ui@3.2.0

@embedpdf/engine-runtime@3.2.0

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

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

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

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

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

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

@embedpdf/engine-runtime-wasm32@3.2.0

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

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

@embedpdf/plugin-actions@3.2.0

@embedpdf/plugin-attachment@3.2.0

@embedpdf/plugin-commands@3.2.0

@embedpdf/plugin-fonts@3.2.0

@embedpdf/plugin-history@3.2.0

@embedpdf/plugin-i18n@3.2.0

@embedpdf/plugin-interaction@3.2.0

@embedpdf/plugin-link@3.2.0

@embedpdf/plugin-measurement@3.2.0

@embedpdf/plugin-metadata@3.2.0

@embedpdf/plugin-outline@3.2.0

@embedpdf/plugin-page-edit@3.2.0

@embedpdf/plugin-redaction@3.2.0

@embedpdf/plugin-render@3.2.0

@embedpdf/plugin-search@3.2.0

@embedpdf/plugin-selection@3.2.0

@embedpdf/plugin-shell@3.2.0

@embedpdf/plugin-signature@3.2.0

@embedpdf/plugin-stamp@3.2.0

@embedpdf/plugin-view-manager@3.2.0

@embedpdf/viewer-angular@3.2.0

@embedpdf/viewer@3.2.0

@embedpdf/viewer-react@3.2.0

@embedpdf/viewer-svelte@3.2.0

@embedpdf/viewer-vue@3.2.0

16 days ago
embed-pdf-viewer

Release v3.1.0

@cloudpdf/contract@3.1.0

Minor Changes

  • #1030 by @bobsingor – The manifest and a write's cache delta carry viewportsVersion, the pin of the pages' scales. The page layout carries each page's viewports, and doc.pages.setScale answers with the new layout. The changes endpoint takes the pages.setScale op. The page list and the measurement viewport are named components.

@cloudpdf/engine@3.1.0

Minor Changes

  • #1030 by @bobsingor – The layout is read at the manifest's viewportsVersion as well as its layoutVersion, so it carries the pages' scales and a scale change reaches every client. page.measure.setScale() is a one-page doc.pages.setScale change.

  • #1033 by @bobsingor – A token function now runs once per token, not once per request. The engine keeps the token it gives, and calls the function again in the background a minute before that token expires, so no request waits for the renewal and a long session never runs out. Requests that arrive together share one call; a renewal that fails is tried again 5 seconds later while the kept token still works. When CloudPDF refuses a kept token, the engine asks the function once more and sends the request again. A literal token works as before.

@cloudpdf/sdk@3.1.0

Minor Changes

  • #1030 by @bobsingor – The types carry viewportsVersion on the manifest and a write's cache delta, viewports on a page's layout, the pages.setScale change op and its answer, and the new layout in doc.pages.setScale's answer.

@cloudpdf/server@3.1.0

Minor Changes

  • #1030 by @bobsingor – Layers and versions keep viewports_version (migration 053), raised by a scale change and by nothing else, so the outline, search and export caches stay warm across one. The layout's cached URL carries it; a token without it gets the layout without viewports. PUT …/pages/:pageKey/scale is a one-op change, so its opId undoes it. The changes endpoint applies pages.setScale.

@cloudpdf/viewer@3.1.0

Minor Changes

  • #1033 by @bobsingor – src: { id, token } keeps the document open when src changes but its id doesn't, and takes the next token from the new src. A token function written inline in a component, made again on every render, no longer reopens the document.

@embedpdf/core@3.1.0

Minor Changes

  • #1029 by @bobsingor – ctx.storeChangeCount() says how many times the store changed: a state or mirror write anywhere, or a ctx.notify(), counted when the change happens, also while the change stream is held. Give it to memo or memoByKey as the input of a read whose answer comes from functions you can't name the inputs of, so the read asks them once per store change, however many readers ask. Test contexts from @embedpdf/core/testing have it too.

    memo and memoByKey compare their inputs with a plain loop, which makes every cached read a little cheaper.

Patch Changes

  • #1030 by @bobsingor – The page list takes a page scale change's new layout from its event, and shows a pending one at once. The test context's pages can carry viewports, and a document event that moves them wakes the store's readers, as in the kernel.

  • #1028 by @bobsingor – A page mirror's write costs the same however many pages it holds. Each page load copied every loaded page's entry, so loading every page of a 1,000-page document took about 2,000 writes and 1.5 million copies.

@embedpdf/core-ui@3.1.0

Minor Changes

  • #1029 by @bobsingor – omittedCommandsOf(data, resolve, menuTarget) takes which menu each button opens as its own argument, as layoutToolbar does (the commands' getMenuTarget, or getCommand), so resolve is asked only whether a command shows, and only for the commands that decide it. Without menuTarget, resolve says which menu a button opens, as before.

@embedpdf/engine-core@3.1.0

Minor Changes

  • #1030 by @bobsingor – A page's layout carries its measurement viewports: PageLayout.viewports, left out for a page without any. A page scale is a change op, pages.setScale { pages, measure }, with the verb doc.pages.setScale(pages, measure): one change can set the scale of many pages, and its undo puts back what each page had. The pages.scaleSet event and PageScaleResult carry pages, measure and the new layout; page stays as the first of pages. A pending scale change shows in the predicted page list (viewportsWithScale, scaleBackOf). The cloud layout token and manifest carry an optional viewportsVersion.

@embedpdf/engine@3.1.0

Minor Changes

  • #1030 by @bobsingor – doc.pages.setScale(pages, measure) sets the scale of many pages in one change, and page.measure.setScale() is a one-page change, so a scale change can be undone. pages.list() returns each page's measurement viewports, read without loading any page.

@embedpdf/engine-runtime@3.1.0

Minor Changes

  • #1030 by @bobsingor – Adds the raw viewport functions: EPDFPage_CountViewportsRaw, EPDFPage_GetViewportRaw, EPDFPage_AddViewportRaw, EPDFPage_RemoveViewportRaw and EPDFViewport_Close, which read and write a page's /VP without parsing the page.

@embedpdf/engine-services@3.1.0

Minor Changes

  • #1030 by @bobsingor – Listing pages reads each page's measurement viewports from its dictionary, without loading the page, and measure.viewports and scale writes no longer load the page either. A pages.setScale op applies a scale to every page it names, taking a scale's origin on each page's own visible box, and records each page's previous scale for undo.

@embedpdf/plugin-measurement@3.1.0

Minor Changes

  • #1030 by @bobsingor – A page's scale comes with the page: opening a document no longer reads every page's viewports, so getPageScale(page) is ready at once and ensureLoaded() resolves at once. A scale change (calibrate, set, unit, precision, preset or clear) is one change of the document, the scale and the re-measured measurements together: one request and one undo step, however many pages it covers. A refused change fails every page of it.

@embedpdf/viewer-angular@3.1.0

Minor Changes

  • #1027 by @bobsingor – The viewer takes a features input, which it follows while it runs: what people can do, a feature or a part on or off ([features]="{ measurement: true }"). Measuring, redaction, building forms and snapshots now start off until features turns them on. disable is deprecated and goes in 4.0.

@embedpdf/viewer-chrome@3.1.0

Minor Changes

  • #1031 by @bobsingor – The View only label is no longer in the default layout: a read-only viewer just shows no tools, as a PDF reader does. To tell people why, add it where you want it: layout: (layout) => layout.add({ custom: 'view-only' }, { to: 'main', before: 'panel:search' }). It still shows only while nothing can change the document.

  • #1027 by @bobsingor – A features prop says what people can do in the viewer, everywhere at once: a feature or a part by its name, true or false ({ measurement: true, 'documents.download': false }). A feature left out keeps its default, and a part wins over its feature, in any order, so { annotations: false, 'annotations.highlight': true } is highlighting and nothing else. readOnly comes after it, so features never brings a tool back into a read-only viewer. features follows its prop, and a name that is no feature or part warns once in the console.

    Measuring, redaction, building forms and snapshots now start off: the Measure, Redact and Form tabs and Take a Snapshot show once features turns them on ({ measurement: true, redaction: true, 'forms.building': true, snapshots: true }). Until then, measurement and redaction marks already in a document show but can't be changed by hand, and people fill in forms but can't move their fields.

    disable is deprecated and goes in 4.0. It still works: a feature in it counts as false under features, and a command in it stays off. Turn a feature off with features, move or remove a button with the layout, and take one button out everywhere with the commands plugin's disabledCommands.

Patch Changes

  • #1029 by @bobsingor – The bars find which menu a button opens from its command's definition, so leaving out a button whose menu shows nothing no longer asks every command in every mode on each change.

  • #1030 by @bobsingor – The scale panel no longer shows a viewport read error: a page's scale comes with the page.

@embedpdf/viewer@3.1.0

Minor Changes

  • #1033 by @bobsingor – A door can keep a document open under a new src: DoorEngine.follows(opened, next) says whether next names the same document as the one that is open, and the element then keeps it instead of opening it again.

  • #1027 by @bobsingor – <embedpdf-viewer> takes features, in its config or as its own property (element.features), and follows it while the viewer runs. Measuring, redaction, building forms and snapshots now start off: features: { measurement: true, redaction: true, 'forms.building': true, snapshots: true } turns them on. disable and element.disable are deprecated and go in 4.0.

@embedpdf/viewer-react@3.1.0

Minor Changes

  • #1027 by @bobsingor – The viewer takes a features prop, which it follows while it runs: what people can do, a feature or a part on or off (features={{ measurement: true }}). Measuring, redaction, building forms and snapshots now start off until features turns them on. disable is deprecated and goes in 4.0.

@embedpdf/viewer-svelte@3.1.0

Minor Changes

  • #1027 by @bobsingor – The viewer takes a features prop, which it follows while it runs: what people can do, a feature or a part on or off (features={{ measurement: true }}). Measuring, redaction, building forms and snapshots now start off until features turns them on. disable is deprecated and goes in 4.0.

@embedpdf/viewer-vue@3.1.0

Minor Changes

  • #1027 by @bobsingor – The viewer takes a features prop, which it follows while it runs: what people can do, a feature or a part on or off (:features="{ measurement: true }"). Measuring, redaction, building forms and snapshots now start off until features turns them on. disable is deprecated and goes in 4.0.

@embedpdf/core-annotation@3.1.0

Patch Changes

  • #1025 by @bobsingor – The ink stroke under the pen draws as its points, joined round, and as the curves Acrobat fits once the pen lifts. Fitted again on every pointer move, it shifted all along its length while it was being drawn. A stroke the pen has left is fitted once, not on every move of the next one.

  • #1022 by @bobsingor – A replaceDefaults message sets a tool's defaults to exactly the fields it gives, where setDefaults merges a patch over them.

@embedpdf/core-stage@3.1.0

Patch Changes

  • #882 by @chahore – itemOfPage() finds the item holding a page when the layout's groups aren't in page order, as with a reordered set or a subset of a document's pages, in both linearLayout and gridLayout.

@embedpdf/svelte@3.1.0

Patch Changes

  • #1034 by @bobsingor – <RenderLayer> no longer shows Chrome's broken-image icon in the page's corner while the first picture renders: the page's base image stays hidden until it has a source.

@embedpdf/plugin-annotation@3.1.0

Patch Changes

  • #1030 by @bobsingor – The measurement host seam stages a page's re-measure at once (whenRemeasurable(), stageRemeasure()), so a scale change takes it into its own change.

  • #1022 by @bobsingor – The tools setting applies its entries in order, so each tool behaves the way the list reads:

    • A change reaches only the tool it names. Changing ink no longer changes the built-in highlighter, and changing line, polyline or polygon no longer changes the Distance, Calibrate, Perimeter or Area tools.
    • extends starts from a copy of a tool listed before it, as the entries above it left it. A change written after it doesn't reach the copy. Naming a tool that only comes later throws an error that says so.
    • extends no longer copies meta, so a tool you make never shows the label or icon of the tool it came from.
    • tools.register() adds one more entry after the setting's. It can extend a tool registered before it, and the function it returns puts a tool it changed back the way it was, defaults included, where it used to remove the tool.

@embedpdf/plugin-commands@3.1.0

Patch Changes

  • #1029 by @bobsingor – A command's enabled, active, visible, labelParams, iconAccent, allowed and locked are asked once per store change, however many toolbars, menus and strips show the command, and its label and disabled reason are translated again only when one of their answers changed. Scrolling and zooming a long document no longer spends a fifth of its time asking every command again.

    resolveCommand and listCommands follow every change the viewer knows of: the viewer's own state, your app's state given through appState, and a command that ran. execute and canExecute ask the command at the moment they're called, so a run never goes by an answer that something outside the viewer changed since.

@cloudpdf/web@3.1.0

@cloudpdf/plugin-protected-display@3.1.0

@cloudpdf/server-modules@3.1.0

@cloudpdf/viewer-angular@3.1.0

@cloudpdf/viewer-react@3.1.0

@cloudpdf/viewer-svelte@3.1.0

@cloudpdf/viewer-vue@3.1.0

@embedpdf/core-acrojs@3.1.0

@embedpdf/core-fonts@3.1.0

@embedpdf/core-form@3.1.0

@embedpdf/core-geometry@3.1.0

@embedpdf/core-js-sandbox@3.1.0

@embedpdf/core-signature@3.1.0

@embedpdf/core-text@3.1.0

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

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

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

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

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

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

@embedpdf/engine-runtime-wasm32@3.1.0

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

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

@embedpdf/angular@3.1.0

@embedpdf/react@3.1.0

@embedpdf/vue@3.1.0

@embedpdf/web@3.1.0

@embedpdf/plugin-actions@3.1.0

@embedpdf/plugin-attachment@3.1.0

@embedpdf/plugin-fonts@3.1.0

@embedpdf/plugin-form@3.1.0

@embedpdf/plugin-history@3.1.0

@embedpdf/plugin-i18n@3.1.0

@embedpdf/plugin-interaction@3.1.0

@embedpdf/plugin-link@3.1.0

@embedpdf/plugin-metadata@3.1.0

@embedpdf/plugin-outline@3.1.0

@embedpdf/plugin-page-edit@3.1.0

@embedpdf/plugin-redaction@3.1.0

@embedpdf/plugin-render@3.1.0

@embedpdf/plugin-search@3.1.0

@embedpdf/plugin-selection@3.1.0

@embedpdf/plugin-shell@3.1.0

@embedpdf/plugin-signature@3.1.0

@embedpdf/plugin-stage@3.1.0

@embedpdf/plugin-stamp@3.1.0

@embedpdf/plugin-view-manager@3.1.0

18 days ago
embed-pdf-viewer

Release v3.0.0

EmbedPDF 3.0 is EmbedPDF rebuilt, from the PDF engine up. There are three ways to use it:

  • The ready-made viewer. A complete PDF viewer you add with one tag, in plain HTML, React, Vue, Svelte or Angular, and make your own with a few lines of config. See the Quick start.
  • Headless components. Build your own viewer UI from the same plugins, with bindings for React, Vue, Svelte and Angular. See Headless components.
  • The EmbedPDF Engine. Open, read, change and render PDFs from your own code. It runs in the browser on WebAssembly, and in Node on native builds for macOS, Linux and Windows. See Engine.

What the viewer does

Every feature is on from the start, and each one can be turned off:

  • Annotations: highlight, underline and strike out text; draw; notes, text boxes and callouts; shapes; stamps; comments with replies.
  • Forms and signatures: fill in forms and build them; draw, type or upload a signature, sign fields, and check signatures.
  • Redaction: mark text and areas, then remove them from the file for good.
  • Measurement: distances, perimeters and areas at the drawing's scale.
  • Pages: rotate, move, insert, duplicate and delete pages, each step undoable.
  • Reading: search, text selection, thumbnails, the outline, attachments, snapshots, printing, downloading, and several documents in tabs.

All features lists each one with its settings.

Install

npm install @embedpdf/viewer

From a CDN: https://cdn.jsdelivr.net/npm/@embedpdf/viewer@3/dist/embedpdf.js. For React, Vue, Svelte and Angular, install @embedpdf/viewer-react, @embedpdf/viewer-vue, @embedpdf/viewer-svelte or @embedpdf/viewer-angular.

Moving from 2.x

  • New package names. The viewer packages from 2.x, @embedpdf/snippet, @embedpdf/react-pdf-viewer, @embedpdf/vue-pdf-viewer and @embedpdf/svelte-pdf-viewer, are replaced by @embedpdf/viewer and its framework packages.
  • A guide, name by name. Moving from 2.x maps every 2.x package and config key to its 3.0 counterpart.
  • 2.x stays where it is. Its docs are at v2.embedpdf.com, and 2.x fixes publish under the npm tag v2-latest.

CloudPDF

CloudPDF, the company that makes EmbedPDF, publishes the @cloudpdf packages:

  • the same viewer for documents kept on a CloudPDF server (@cloudpdf/viewer, @cloudpdf/viewer-react, @cloudpdf/viewer-vue, @cloudpdf/viewer-svelte and @cloudpdf/viewer-angular);
  • the server itself (@cloudpdf/server), also published as the image ghcr.io/embedpdf/cloudpdf-server:3.0.0 and the Helm chart oci://ghcr.io/embedpdf/charts/cloudpdf-server;
  • an SDK for its API (@cloudpdf/sdk).

See the server docs.

Thanks

Thanks to everyone who tried the next releases and told us what broke.

Every package

Each package's CHANGELOG.md has its full list of changes. The 3.0.0 entry gathers every change since 2.15.0. Every package is at 3.0.0, except the three font and stamp packages, which are at 1.0.0.

The viewer: @embedpdf/viewer, @embedpdf/viewer-angular, @embedpdf/viewer-chrome, @embedpdf/viewer-react, @embedpdf/viewer-svelte, @embedpdf/viewer-vue.

Framework bindings: @embedpdf/angular, @embedpdf/react, @embedpdf/svelte, @embedpdf/vue, @embedpdf/web.

Plugins: @embedpdf/plugin-actions, @embedpdf/plugin-annotation, @embedpdf/plugin-attachment, @embedpdf/plugin-commands, @embedpdf/plugin-fonts, @embedpdf/plugin-form, @embedpdf/plugin-history, @embedpdf/plugin-i18n, @embedpdf/plugin-interaction, @embedpdf/plugin-link, @embedpdf/plugin-measurement, @embedpdf/plugin-metadata, @embedpdf/plugin-outline, @embedpdf/plugin-page-edit, @embedpdf/plugin-redaction, @embedpdf/plugin-render, @embedpdf/plugin-search, @embedpdf/plugin-selection, @embedpdf/plugin-shell, @embedpdf/plugin-signature, @embedpdf/plugin-stage, @embedpdf/plugin-stamp, @embedpdf/plugin-view-manager.

Core: @embedpdf/core, @embedpdf/core-acrojs, @embedpdf/core-annotation, @embedpdf/core-fonts, @embedpdf/core-form, @embedpdf/core-geometry, @embedpdf/core-js-sandbox, @embedpdf/core-signature, @embedpdf/core-stage, @embedpdf/core-text, @embedpdf/core-ui.

Engine: @embedpdf/engine, @embedpdf/engine-core, @embedpdf/engine-runtime, @embedpdf/engine-runtime-darwin-arm64, @embedpdf/engine-runtime-darwin-x64, @embedpdf/engine-runtime-linux-arm64, @embedpdf/engine-runtime-linux-x64, @embedpdf/engine-runtime-linuxmusl-arm64, @embedpdf/engine-runtime-linuxmusl-x64, @embedpdf/engine-runtime-wasm32, @embedpdf/engine-runtime-win32-arm64, @embedpdf/engine-runtime-win32-x64, @embedpdf/engine-services.

Fonts and stamps: @embedpdf/default-fallback-fonts, @embedpdf/default-signature-fonts, @embedpdf/default-stamps.

CloudPDF: @cloudpdf/contract, @cloudpdf/engine, @cloudpdf/plugin-protected-display, @cloudpdf/sdk, @cloudpdf/server, @cloudpdf/server-modules, @cloudpdf/viewer, @cloudpdf/viewer-angular, @cloudpdf/viewer-react, @cloudpdf/viewer-svelte, @cloudpdf/viewer-vue, @cloudpdf/web.

18 days ago
embed-pdf-viewer

Release Next v3.0.0-next.23

@cloudpdf/contract@3.0.0-next.23

Minor Changes

  • #991 by @bobsingor – The manifest and a mutation's cacheDelta have contentsVersion, the document-wide pin of every page's content.

  • #989 by @bobsingor – GET …/head answers engine, the server's engine value for each kind of cached read. The manifest no longer has serverFonts.

  • #994 by @bobsingor – Every error response is the one error body, ErrorResponse, with its error EngineError; AdminErrorPayloadSchema and AdminThumbnailUnavailablePayloadSchema are gone, and a thumbnail that isn't ready says its state in details.state. Operations no longer get a type per error status, so a response type is named after its operation alone (DocFormsListResponse, not DocFormsList200Response). Sizes, counts, durations and the admin timestamps are integers. nextCursor, thumbnailState and thumbnailUrl are always there, and the license status's license, reporting and usage too (null when there's nothing). A union of whole-number literals, such as a rotation or a DocMDP level, is one integer enum in openapi.json.

  • #996 by @bobsingor – Every point in time is an ISO 8601 string (format: date-time): createdAt, updatedAt, archivedAt, lastExchangedAt, firstSeenAt, lastSeenAt and consentedAt on tenants, documents, folders, grants, layers and visitors, and every expiresAt (grants, the upload URL, tokens, grant sessions, download links), which were milliseconds in some places and seconds in others. A request gives one with its offset: a grant's expiresAt, and a token revoke's expiresAt, which replaces expiresAtSeconds. A date a write takes as a Date in process is a date-time string in openapi.json. A schema a model reuses no longer takes the nullable of the field that used it first: a grant's createdAt and updatedAt, and a visitor's firstSeenAt and lastSeenAt, read as non-null.

  • #997 by @bobsingor – Names and units follow one rule: a document's baseSha and storageSizeBytes are baseSha256 and sizeBytes, and so is a layer's and a visitor's layer's storageSizeBytes; the init request's contentLength and uploadTtlSec are sizeBytes and uploadTtlSeconds; token issue's and the download link's expiresIn is expiresInSeconds; folders move-into takes docIds (its 404 names details.docIds); usage metrics are pdfViews, pdfUploads and storageBytes, and a module's meters move to their own moduleMeters map; and the path parameters are {docId}, {annotationKey}, {sha256} and {displaySha256} (the URLs don't change).

  • #995 by @bobsingor – A destination's axes are always there, null to keep the viewer's value, and a document's openDestination is always there. A line's captionEnabled is a boolean, never null. A grant create takes null for origins and expiresAt, as a grant read says them, meaning any origin and no expiry.

  • #1005 by @bobsingor – A document head's permissions.flags (the named PdfPermissionFlags) replaces the raw bits word.

  • #982 by @bobsingor – A widget reads hasMark: true when it is a signature field's widget with a mark in it, because the field is signed or a mark was drawn in. Such a widget shows the mark, and a change to its style is refused.

  • #1002 by @bobsingor – The document init and import answers say what happened in status (created, resumed or deduped; imported, deduped or accepted), not tag, as every call's answer does. Form fields are tagged kind (was family) and a widget says fieldKind. The contract test checks that a union is tagged type, kind, status or subtype.

  • #992 by @bobsingor – The contract declares EmbedPDF-Version as a literal global header, so every generated SDK sends the major and minor of the release it was generated from.

Patch Changes

  • #993 by @bobsingor – openapi.json writes a field's stored value and a measure out once, as FormValueEntry and PdfMeasurement, instead of once per field family and annotation kind, and each union and enum with a catch-all says what an unknown kind or value reads as. A new test fails when a union with a catch-all has no name in the contract, no row in the SDK checks' list or no fixture case. SHARED_COMPONENT_SCHEMAS is exported from @cloudpdf/contract/openapi.

  • #990 by @bobsingor – Every response schema reads tolerantly: none refuses a field it doesn't know, and every set it carries is marked closed or names what an unknown value reads as, which a new test checks for each operation. A request naming an identity is still parsed strictly, and the OpenAPI projection maps that strict twin to the same Identity component, so openapi.json is unchanged.

@cloudpdf/engine@3.0.0-next.23

Minor Changes

  • #991 by @bobsingor – Searches pin the manifest's contentsVersion and layoutVersion, copied rather than computed, and a write's contentsVersion is absorbed into the cached manifest.

  • #989 by @bobsingor – Cached reads copy each kind's engine value from /head into their URLs, with the shape this client reads. An answer that names another engine value (EmbedPDF-Engine) makes the next cached read learn /head again.

  • #994 by @bobsingor – Every server error reads as an EngineError with the server's code: GrantExpired, OriginNotAllowed, OriginRequired, EngineBusy and the rest of the codes the server sends are the error's code, not Forbidden or Unknown. A code this client doesn't know falls back to the HTTP status.

  • #996 by @bobsingor – A grant session's expiresAt is an ISO 8601 string, and renewal works from it.

  • #992 by @bobsingor – Every request to the server says which version the client speaks, in EmbedPDF-Version. A read through a CDN leaves it out: its answer never depends on it.

Patch Changes

  • #997 by @bobsingor – Reads the renamed engine fields (displaySha256, contentsSizeBytes, baseSha256, and the editing session's expiresInSeconds).

  • #995 by @bobsingor – GrantSessionOptions.visitorStore is a VisitorStore, left out for none.

  • #1005 by @bobsingor – Reads the head's named permission flags; follows engine-core's names.

  • #998 by @bobsingor – A document opened with a token that may not read another client's write, its annotations or its form fields, now hears fonts.changed when that write changed the document's fonts, as one that may read the write does.

  • #1003 by @bobsingor – Follows engine-core's names; exported functions take options.

  • #1000 by @bobsingor – Follows engine-core: an event's origin says subject, at (ISO 8601), serverSequence and transaction; the grant's callbacks are onIdentityRequested and onOpenRequested, and its resume() takes visitorIdentity.

@cloudpdf/sdk@3.0.0-next.23

Minor Changes

  • #991 by @bobsingor – The manifest and cache delta types have contentsVersion.

  • #989 by @bobsingor – The head type has engine, the server's engine value for each kind of cached read; the manifest type no longer has serverFonts.

  • #994 by @bobsingor – Every error response is one type, ErrorResponse, with its error EngineError and a code from one list, replacing EngineErrorPayload, AdminErrorPayload and the per-operation error types such as DocHead404Response. A response type is named after its operation alone (DocFormsListResponse, not DocFormsList200Response). Sizes, counts, durations and timestamps are integers, and nextCursor, thumbnailState and thumbnailUrl are always there. A signature's fieldMdp and lock are FieldLockSpec, whose permission is a DocMdpPermission that is never null. A DocMDP level and a page or widget rotation are integers.

  • #996 by @bobsingor – Every point in time is an ISO 8601 date-time string, where createdAt, updatedAt, the other …At fields and every expiresAt were numbers in milliseconds or seconds. A token revoke takes expiresAt instead of expiresAtSeconds. A grant's createdAt and updatedAt, and a visitor's firstSeenAt and lastSeenAt, are no longer typed nullable.

  • #997 by @bobsingor – Names follow one rule: sizeBytes (documents, layers, versions and the init request), baseSha256, a manifest's baseSizeBytes, uploadTtlSeconds (also on uploads.create), expiresInSeconds, docIds, md5, displaySha256 and sourceSha256, contentsSizeBytes, changedRefs, usage metrics pdfViews, pdfUploads and storageBytes with module meters in a typed moduleMeters map, a submit-form action's named flags, a seed value's …Required booleans and parserVersion, and the path arguments docId, annotationKey, sha256 and displaySha256. /access, the event stream's session event and object-number reservations say expiresInSeconds. Action trees drop warningFlags.

  • #995 by @bobsingor – A destination's x, y and zoom are always there, null to keep the viewer's value, and a document's openDestination is always there. A line's captionEnabled is a boolean, never null. A grant create takes null for origins and expiresAt, as a grant read says them.

  • #993 by @bobsingor – A field's stored value and a measure are one type each, FormValueEntry and PdfMeasurement, replacing the per-family and per-kind copies such as FormFieldTextValueEntry and AnnotationLineMeasure. The documentation of each union and enum with a catch-all says what a kind or value the SDK doesn't know reads as.

  • #1005 by @bobsingor – A document head's permissions.flags (PdfPermissionFlags) replaces bits.

  • #982 by @bobsingor – WidgetAnnotation has hasMark: true for a signature field's widget with a mark in it (signed, or a mark drawn in), whose style can then no longer change.

  • #1002 by @bobsingor – uploads.create() and upload() resolve { status, document } (was tag). Form fields are tagged kind, and the init and import answers say status.

  • #992 by @bobsingor – Every request sends EmbedPDF-Version, the version the SDK was generated from.

@cloudpdf/server@3.0.0-next.23

Minor Changes

  • #991 by @bobsingor – Layers and base versions store contents_version (migration 052), raised in the same transaction as a flatten, a redaction or a change to the page set, and published in the manifest. Versioned searches pin it with layoutVersion instead of a content epoch, so an annotation write keeps every cached search and a content write refreshes them; the unversioned search form takes the same two pins as optional parameters.

  • #989 by @bobsingor – /head carries this server's engine value for each kind of cached read: a digest of the rules and fonts it computes that kind with, never of its release, so a deploy that changes nothing keeps every cached answer. Every versioned read checks the token's engine value and shape: a shape newer than the server answers is refused, and another engine value is answered with this server's own answer, uncached, and its value in EmbedPDF-Engine (exposed to browsers), so nothing is cached under a value that doesn't describe it and no request fails during a rolling deploy. Renders are stored by engine value. The manifest no longer carries serverFonts.

  • #994 by @bobsingor – Every error response is { error: { code, message, details? } } with a code from EngineErrorCode. An engine error no longer carries name. A license refusal is LicenseInvalid with the license status's code in details.licenseCode; a usage limit says its metric and limit in details; a thumbnail that isn't ready says its state in details.state; BadInput is InvalidArg; and an error from Fastify itself carries the code for its status instead of Fastify's own.

  • #996 by @bobsingor – Every point in time the server sends is an ISO 8601 string in UTC, and a grant's and a token revoke's expiresAt are taken as one, with its offset. Rows keep their milliseconds. The admin routes' records are typed by the contract's, so a field the contract doesn't say no longer compiles.

  • #997 by @bobsingor – Takes and sends the renamed fields: sizeBytes (documents, layers, versions), baseSha256, the manifest's baseSizeBytes, uploadTtlSeconds, expiresInSeconds (also the editing session's on /access, the event stream and object-number reservations), docIds and the camelCase usage metrics (module meters in moduleMeters), and names its path parameters docId, annotationKey, sha256 and displaySha256.

  • #992 by @bobsingor – Every response says which version the server is, in EmbedPDF-Server-Version. A request's EmbedPDF-Version is answered within the server's major; another major, or a value that isn't <major>.<minor>, gets a 400 naming both versions. CORS allows EmbedPDF-Version and exposes EmbedPDF-Server-Version.

Patch Changes

  • #995 by @bobsingor – A grant create takes origins: null and expiresAt: null, as a grant read says them: any origin and no expiry.

  • #1005 by @bobsingor – The head and /access carry named permission flags, not the raw word; /access no longer sends the advisory.

  • #988 by @bobsingor – Every versioned read (…@token) now answers exactly the state its pins name. The pins are checked before the read and again after it, and a read that a layer write began during is refused as no longer current, so a write can no longer end up cached for a year under an older version. Before, page renders, page text and geometry, appearance batches, outline, metadata, fonts, attachments, layout, actions, search, signatures and downloads checked their pins only before reading, and the annotation and form reads could still send an applied but uncommitted write.

  • #990 by @bobsingor – redactions.apply parses its body with RedactionApplyScopeInputSchema, which still refuses a field it doesn't know, now that the scope a response carries is read tolerantly.

  • #1003 by @bobsingor – Follows engine-core's names: FormField, Signature.

  • #1002 by @bobsingor – The document init and import answers say status, not tag. Form fields are tagged kind.

  • #1000 by @bobsingor – The image encoder and the appearance batch say mimeType, as engine-core's render results do.

@embedpdf/core-acrojs@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – cssToScriptColor(css) takes string | null; null is transparent.

  • #1003 by @bobsingor – A script's page move is the effect { type: 'goToPage', pageIndex } (was gotoPage with page).

  • #1002 by @bobsingor – A script's field input says kind (was family), as engine-core's form fields do.

  • #1000 by @bobsingor – ScriptUiEffect is tagged type, as effects are things that happen (was kind). The script host ends with destroy() and says destroyed.

@embedpdf/core-annotation@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – writableTarget(target) takes PdfLinkTarget | null, no undefined.

  • #982 by @bobsingor – A signature field's widget with a mark in it is the widget-mark kind, which has no style rows, so a style panel offers nothing that wouldn't show. widgetKindOf takes the widget (its fieldFamily and hasMark), and drawsLive is exported.

  • #1003 by @bobsingor – Geometry names are spelled out: anchoredGeometry, unanchoredGeometry, effectiveGeometry, obbFromGeometry, isRotatableGeometry.

  • #1002 by @bobsingor – fieldKindOf() replaces fieldFamilyOfKind(), and a widget's fieldKind replaces fieldFamily.

  • #1000 by @bobsingor – The snap settings name their units: alignmentThresholdPx and rotationThresholdDeg.

Patch Changes

  • #995 by @bobsingor – The editor's rich text predicts the engine's rule: a body it gives is replaced whole over the defaults, and without one the annotation's body is kept.

  • #985 by @bobsingor – The rich text model's plain projection joins paragraphs with \n, and a hard line break inside a run is \n, matching the rich text the engine returns.

@embedpdf/core-form@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – widgetScene(drawing, placement) takes a WidgetScenePlacement (was WidgetPlacement, the engine's name for a widget draft's placement).

  • #982 by @bobsingor – The painter draws a signature field's widget: its box, the background and border as a text field draws them, exactly as the engine writes it.

Patch Changes

  • #1003 by @bobsingor – Follows engine-core: form fields are FormField.

  • #1002 by @bobsingor – Follows engine-core: form fields are tagged kind.

@embedpdf/core-geometry@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – Rotation replaces PageRotation, beside Rect, Point and Size.

@embedpdf/core-js-sandbox@3.0.0-next.23

Minor Changes

  • #1000 by @bobsingor – The QuickJS sandbox ends with destroy() and says destroyed, as every other object does.

@embedpdf/core@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – A settings declaration's whole names a setting inside a group by its path ('snapshot.box'), and a whole setting's change takes its defaults for what it leaves out, never the value before. mergeSettings(settings, changes, declaration?) takes the declaration (defaults and whole) instead of the whole list. MirrorSpec.load() answers cursor?: number, no null.

  • #1003 by @bobsingor – PluginDefinition<State, Capability, PluginSettings> replaces PluginDef<S, C, T>, and the generics of PluginContext<State, PluginSettings> and StateCell<State> are named.

  • #1000 by @bobsingor – destroy() is the one verb that ends an object's life, never dispose(): prepared and staged prints, Scope (with destroyed), event hook sources, the settings store and the test kernel. acquire(get, release) names its second argument for what it does. Kernel.getStatus() replaces status(). A document's page-list counter is pagesSequence (on DocumentMeta and DocumentPagesChangedEvent), not revision, which in a PDF means a saved file revision. PendingPage is tagged kind. Settings events carry changedKeys, as metadata's do. Mirror specs take onChanged. A document's grant question is openRequest, as the engine names it, and retry() takes visitorIdentity. changes.listPending() and the page view's getPending(page) start with a verb.

@embedpdf/core-signature@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – validateChain(cms, trust, at?) takes trust: TrustPort | null, no undefined.

  • #1000 by @bobsingor – SignatureVerdict.validationTime replaces validatedAt, which wasn't a time, and validateSignatures() takes validationTime (was at). Times are ISO 8601 strings: ParsedCms.signingTime, BuildDetachedCmsInput.signingTime and a timestamp ValidationTime's genTime.

Patch Changes

  • #997 by @bobsingor – Reads a signature's contentsSizeBytes.

  • #1003 by @bobsingor – Follows engine-core: a signature is Signature.

@embedpdf/core-stage@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – PageGeometry replaces PageGeom, and an Anchor says fractionX and fractionY (were fx and fy).

@embedpdf/core-text@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – defaultPaintFonts(fontFamily) takes string | null, no undefined.

@embedpdf/core-ui@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – resolveLayout(option, defaults, env) takes option: LayoutOption | undefined, no null.

  • #1003 by @bobsingor – CustomSlotContext replaces CustomSlotCtx.

  • #1000 by @bobsingor – OverflowRow is tagged kind, as things that are are.

@embedpdf/engine-core@3.0.0-next.23

Minor Changes

  • #991 by @bobsingor – The manifest has contentsVersion, the document-wide pin of every page's content: it moves with any write that moves a page's contentVersion, inserts a page or deletes one, and a write's cacheDelta carries it when it moved. A search token pins contentsVersion and layoutVersion instead of epoch, and searchContentEpoch is gone.

  • #989 by @bobsingor – Every cached read's token carries its kind's engine value and the shape the client reads (engine, shape): the encoders take a TokenPin and the decoders return one as pin. CACHED_READ_KINDS, SHAPES, tokenPinOf, EngineValues and TokenPin are exported from the wire entry. DocumentHead gains engine, this server's engine value for each kind. DocumentManifest no longer carries serverFonts, and render and appearance tokens carry the engine value in its place. The layout and search tokens drop format (LAYOUT_FORMAT and SEARCH_RESULT_FORMAT are gone): their shape is shape. PAGE_TEXT_VERSION and LINE_BREAKS_VERSION version the rules page text and returned text are read by.

  • #994 by @bobsingor – One error body for every HTTP error, ErrorResponseSchema ({ error: { code, message, details? } }), and EngineErrorSchema for the error inside it, replacing EngineErrorPayloadSchema. A serialized EngineError no longer carries name. EngineErrorCode is the one code list: it gains the codes the server sends (Conflict, EngineBusy, EngineRestarting, DocumentQuarantined, ThumbnailNotReady, TooManyRequests, GrantExpired, OriginRequired, OriginNotAllowed, FeatureNotEnabled, FeatureStopped, LicenseInvalid, LicenseUsageLimit, UpstreamError), and isEngineErrorCode tells whether a value is one. SignatureWireComponents names DocMdpPermission and FieldLockSpec for the OpenAPI document.

  • #996 by @bobsingor – Every point in time on the wire is an ISO 8601 string: an access's expiresAt and its CDN's cdn.expiresAt (DocumentAccessInfo, CdnAccessInfo, AccessResponseSchema), a layer version's createdAt, and a prepared signature's expiresAt (now typed IsoDateTimeSchema). They were Unix seconds, and a layer version's milliseconds.

  • #997 by @bobsingor – Names, units and flags follow one rule (naming.md, "The HTTP API"):

    • Flags are named booleans. A submit-form action reads and writes exclude, includeNoValueFields, format, method and the rest flat on its payload or action, without a flags object or a raw word; encodeSubmitFormFlags is the inverse of decodeSubmitFormFlags. An action tree drops warningFlags (its warnings name them). A seed value says filterRequired, subFiltersRequired, parserVersionRequired, digestMethodsRequired and reasonsRequired instead of requiredFlags and presentFlags, and its version is parserVersion. A form submission's intent drops flagsRaw.
    • One name, one meaning. Mutation results list what they touched in changedRefs (was changed).
    • Units and algorithms in names. An attachment's size and checksum are sizeBytes and md5; a font program's displayHash and sourceHash are displaySha256 and sourceSha256; a version's byteLength is sizeBytes; a signature's contentsSize (and prepare's) is contentsSizeBytes; the head, the manifest and the version list say baseSha256, the head sizeBytes and the manifest baseSizeBytes (was baseByteLength); an editing session's expiresIn (EditSessionAccess, EditSessionStatus, an object-number reservation) is expiresInSeconds.
    • Path parameters are spelled out in wireTemplates: :annotationKey, :sha256 and :displaySha256. The document.fonts.program worker request names its program by displaySha256, and signatures.finalizeCandidate takes contentsSizeBytes.
  • #995 by @bobsingor – One spelling for "nothing" (naming.md, "Nothing: left out or null"):

    • A destination always has its axes: PageDestination's x, y and zoom (and PdfDestination's left, top and zoom) are always there, null to keep the viewer's value, never left out.
    • DocumentActionsSnapshot.openDestination is always there, null when the document has none.
    • CommentThreadReview.mine is always there: null when the reviewer has none, or when no currentUserId was given.
    • An annotation create's groupId: null is no group, refused to a caller who has one; left out is still the caller's own group. It used to put the annotation in the caller's group.
    • A free text's new rich text replaces the body whole when it gives one (what it leaves out takes the default, as on a comment), and keeps the current body when it doesn't. A partial body used to merge over the current one.
    • An annotation create left without nm still gets a fresh name; nm: null now writes none, as a file from a tool that names nothing reads. It used to mint one too. A copy leaves nm out.
    • A widget's fontFamily, fontSize and fontColor take values only: a font can't be removed, so null is only the read sent back (no font on the widget or the form), and is refused beside a font. It used to write Helvetica 12 black.
    • A line's captionEnabled reads false without /Cap, the PDF's default, and takes no null. A polygon's and polyline's keep null for no caption and no placement.
    • OpenOptions.password is string, left out for none.
    • LineCaptionPatch and ShapeCaptionPatch, unused, are gone.
  • #993 by @bobsingor – Every union a response carries with a catch-all kind is a named contract model: a field's stored value (FormValueEntry) and a measure (PdfMeasurement) join Annotation, FormField, PdfLinkTarget and PdfActionNode in the wire components. Each of the six, a widget's fieldFamily and an error's code now describe what a client reads a kind or value it doesn't know as. openUnionOf() and openUnionsIn() in @embedpdf/engine-core/conformance find the unions with a catch-all in a schema.

  • #985 by @bobsingor – Page text ends its lines in \n and leaves out the characters a reader can't see as text. A line break PDFium extracts as \r\n gives \n: its \r keeps its place in character space and gives no text. A Unicode noncharacter gives no text either, so a word PDFium joined across a line-end hyphen (which it marks with U+FFFE) reads, copies and searches whole: Verita- and serum read Veritaserum. Character positions don't change, so selections, highlights and search hits are where they were. New exports: toPageText (the projection), isNoncharacter and toLineBreaks.

    Search ignores invisible characters, so a match runs across a soft hyphen, a zero-width space or joiner, a bidi mark, U+FEFF, a control code other than whitespace, or a noncharacter. SEARCH_FOLD_VERSION is now 2.

    Every other string the engine returns ends its lines in \n too: an annotation's contents (its rich text's plain projection joins paragraphs with \n) and a hard line break inside a rich text run, which RichTextRun.text now spells \n.

  • #1005 by @bobsingor – A PDF's permissions are named flags, PdfPermissionFlags: print, modifyContents, copy, modifyAnnotations, fillForms, copyForAccessibility, assemble and printHighQuality (pdf.js's names), replacing PdfBits and its bit3…bit12. A document head's and security state's permissions.flags replaces the raw bits word, and PdfPermissionInfo carries flags with no bits. The advisory (canPrint, …) and advisoryFromPdfBits() are gone: materializePdfPermissions(flags) says what pdf.permissions grants. permissionFlagsOf(word) replaces decodePdfBits(), and the permission checks take permissionFlags.

  • #982 by @bobsingor – A widget reads hasMark: true when it is a signature field's widget with a mark in it, because the field is signed or a mark was drawn in with forms.setSignatureAppearance. A new signature field's widget is predicted with its appearance (its box), and WIDGET_STYLE_NAMES lists the fields that make up a widget's style.

  • #990 by @bobsingor – Responses are read tolerantly, as docs/conventions/api-evolution.md asks, so a client keeps working against a newer server. No schema a response is parsed with refuses a field it doesn't know any more, nested ones included (LineLeaderSchema, a measure's origin, IdentitySchema, RedactionApplyScopeSchema, BundleLimitsSchema, ImageResourceKeysSchema); requests are still parsed strictly, with LineLeaderWriteSchema, IdentityInputSchema and RedactionApplyScopeInputSchema.

    An annotation of a subtype the client doesn't know reads as unsupported instead of failing the whole list, keeping the fields every annotation has, with rawSubtypeCode and rawSubtypeName from the body when it carries them and 0 and null when it doesn't. A subtype the client knows with a malformed body still fails. The other sets with a catch-all read the same way: an error code as Unknown, a widget's fieldFamily and a form field's family as unknown, a measure as unknown, a link or outline target as unsupported, an action as unknown and a field's value entry as unsupported.

    Every other enum, literal and union a response carries is marked closed with the new closed(), next to readsUnknownAs() and withCatchAll() for open ones, and readingProblems() and withUnknownFields() in @embedpdf/engine-core/conformance check a schema against the convention.

  • #1003 by @bobsingor – FormField (with TextField, CheckboxField, RadioField, ComboBoxField, ListBoxField, PushButtonField, SignatureField and UnknownField) and Signature replace the …DTO names. The deprecated Point, Rect, Size and Rotation aliases and PointSchema/RectSchema are gone: use the Pdf… names. Exported functions take options, never opts.

  • #1002 by @bobsingor – A form field is tagged kind, not family, as naming.md tags things that are: field.kind === 'checkbox', the type FormFieldKind, a draft's and a patch's kind, and a widget annotation's fieldKind. A values import's diagnostics say unsupported-kind and wrong-kind.

  • #992 by @bobsingor – API_VERSION is the version this release speaks, the major and minor of its package version, with parseApiVersion and apiVersionOf to read one.

  • #1000 by @bobsingor – An event's origin spells out its fields: subject (was sub), at as an ISO 8601 string (was ts, milliseconds), serverSequence (was serverId) and transaction (was tx); stream.desynced carries at, and the event stream's lastServerSequence() replaces lastServerId(). A grant's callbacks are onIdentityRequested and onOpenRequested, and resume() takes visitorIdentity. Render results and appearance pictures say mimeType, as attachments and stamps do (was contentType).

Patch Changes

  • #999 by @bobsingor – A widget's dashArray doc says what the code does: left out on a dashed border is the default pattern, and null is no pattern.

@embedpdf/engine-services@3.0.0-next.23

Minor Changes

  • #982 by @bobsingor – A signature field draws its box: placing one writes its background and border, and a restyle draws them again, as it does for a widget in no field. Once a mark is in the field (it is signed, or a mark was drawn in), the mark stays: a resize keeps it, and a style change is refused with InvalidArg. A mark drawn in records how it fits the widget, as a stamp records its own.

  • #1000 by @bobsingor – A worker image encoder's result says mimeType (was contentType), as render results do.

Patch Changes

  • #997 by @bobsingor – Reads and writes a submit-form action's flags by name, and says the renamed fields (sizeBytes, md5, displaySha256, contentsSizeBytes, changedRefs, the seed value's booleans).

  • #995 by @bobsingor – A stamping import still puts an item in no group in the caller's group, now that an annotation create's groupId: null asks for no group, and still gives each copy a fresh name, now that nm: null asks for none.

  • #985 by @bobsingor – Page text comes from toPageText: lines end in \n, and noncharacters such as the U+FFFE PDFium writes for a joined line-end hyphen give no text. An annotation's /Contents reads with \n line breaks and is written with \r, as Acrobat writes it. Hard line breaks in rich text runs read as \n and are written as \r.

  • #1003 by @bobsingor – Follows engine-core's names.

  • #1002 by @bobsingor – Follows engine-core: form fields are tagged kind.

@embedpdf/angular@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The viewer takes null for identity and scope, as its settings read them: identity: null is nobody, and scope: null lets the user do everything.

  • #1003 by @bobsingor – Follows the plugins: CommandDefinition, FormField, selectionHandleGeometry, CustomSlotContext, and an actions adapter's goToPage(pageIndex).

  • #1000 by @bobsingor – Follows the plugins: EpdfAttachment has create, delete, canCreate and canDelete; EpdfViewManager has deletePane and paneDeleted$; EpdfLink.readAllLinks, EpdfStamp.getAssetBytes, EpdfFonts.readProgram, EpdfActions.readActionTree; a command's shortcutLabel.

@embedpdf/react@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The viewer takes null for identity and scope, as its settings read them: identity: null is nobody, and scope: null lets the user do everything.

  • #1003 by @bobsingor – Follows the plugins: CommandDefinition, FormField, selectionHandleGeometry, CustomSlotContext, and an actions adapter's goToPage(pageIndex).

Patch Changes

  • #1000 by @bobsingor – Follows the plugins: the attachment state's canCreate, OverflowRow.kind, destroy().

@embedpdf/svelte@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The viewer takes null for identity and scope, as its settings read them: identity: null is nobody, and scope: null lets the user do everything.

  • #1003 by @bobsingor – Follows the plugins: CommandDefinition, FormField, selectionHandleGeometry, CustomSlotContext, and an actions adapter's goToPage(pageIndex).

Patch Changes

  • #1000 by @bobsingor – Follows the plugins: the attachment state's canCreate, OverflowRow.kind, destroy().

@embedpdf/vue@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The viewer takes null for identity and scope, as its settings read them: identity: null is nobody, and scope: null lets the user do everything.

  • #1003 by @bobsingor – Follows the plugins: CommandDefinition, FormField, selectionHandleGeometry, CustomSlotContext, and an actions adapter's goToPage(pageIndex).

Patch Changes

  • #1000 by @bobsingor – Follows the plugins: the attachment state's canCreate, OverflowRow.kind, destroy().

@embedpdf/web@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – An actions adapter's page move is goToPage(pageIndex, context). Follows core-geometry: Rotation.

  • #1000 by @bobsingor – The printer ends with destroy(). A page projector's stage is read through getPageBox(), and a link anchor dispatches { type: 'annotation', annotation }, as the actions plugin's triggers are.

Patch Changes

  • #985 by @bobsingor – The rich text editor reads a hard line break, however the browser spells it, as \n, and its offsets count paragraphs joined by \n, matching the rich text the engine returns.

@embedpdf/plugin-actions@3.0.0-next.23

Minor Changes

  • #997 by @bobsingor – SubmitIntent and ActionSubmitRequest drop flagsRaw: an intent's format, method and resolved fields already say what the flags meant.

  • #1003 by @bobsingor – The UI adapter's page move is goToPage(pageIndex, context) (was gotoPage(page, …)). The host contract's AnnotationCommitEntry, AnnotationCommitResult and AnnotationCommitSink are spelled out. Read shapes are readonly.

  • #1000 by @bobsingor – readActionTree() replaces getActionTree(): a read from the engine is read*. ActionTrigger and ActionTriggerEvent are tagged type (was scope); a trigger's annotation is annotation (was ref) and an event's name is event (was name), as ActionTreeSource says. The host contract's realm ends with destroy().

@embedpdf/plugin-annotation@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – chrome.marquee is one look: a change replaces it whole, and a color it leaves out follows the accent again. The other chrome groups still merge per key.

  • #1003 by @bobsingor – The sub-capabilities are AnnotationSelectionCapability, AnnotationDraftCapability, AnnotationTextCapability, AnnotationToolsCapability, AnnotationStampsCapability, AnnotationLinksCapability and CommentsCapability (were …Api). AnnotationToolDefinition replaces AnnotationToolDef. Read shapes are readonly.

  • #1000 by @bobsingor – The selection is selection.select(refs) and selection.getSelected(), as page-edit, attachment and outline have them (was set and list). CommentThreadChangedEvent is tagged type (was change). The host contract's functions start with a verb: getAuthority, getPictureEpoch, getPictureVersion, isPending, getDistanceCreationPage. The snap settings are alignmentThresholdPx and rotationThresholdDeg.

Patch Changes

  • #982 by @bobsingor – A lent record with no live drawing keeps its picture while a new look is pending, instead of drawing its bare style in its place.

@embedpdf/plugin-attachment@3.0.0-next.23

Minor Changes

  • #1000 by @bobsingor – Attachments are created and deleted, as the engine's attachments.create/delete say: create(), delete(), canCreate(), canDelete() and the state's canCreate (were add, remove, canAdd, canRemove). onChanged says 'created' and 'deleted'.

Patch Changes

  • #997 by @bobsingor – Reads a file's sizeBytes and md5.

@embedpdf/plugin-commands@3.0.0-next.23

Minor Changes

  • #1006 by @bobsingor – A command can have labelParams(context): the values for its label's {name} slots, such as how many pages are selected. It's asked like enabled, again whenever the viewer's state or your app's changes. The values go into label, into the translated words under labelKey or the command's id, where a number count picks the plural form, and into every sentence that names the label. A labelParams that throws gives no values. Without the i18n plugin, label's slots are filled too.

  • #1003 by @bobsingor – CommandDefinition replaces CommandDef.

  • #1000 by @bobsingor – A bound command's formatted shortcut is shortcutLabel; shortcut stays the key a command definition takes.

@embedpdf/plugin-fonts@3.0.0-next.23

Minor Changes

  • #1000 by @bobsingor – readProgram() replaces getProgram(): a read from the engine is read*.

Patch Changes

  • #997 by @bobsingor – Reads a program's displaySha256 and sourceSha256.

@embedpdf/plugin-form@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – FormToolDefinition replaces FormToolDef, and form fields are FormField. Read shapes are readonly.

  • #1002 by @bobsingor – Form fields are tagged kind: list({ kind }), the fillable setting's field kinds (FormFieldKind), a form tool's fieldKind and AuthorableFormKind.

  • #1000 by @bobsingor – WidgetActivationResult is tagged status, as every call result is (was kind). FormUiEffect is tagged type. The scripting realm ends with destroy().

Patch Changes

  • #997 by @bobsingor – A scripted submit no longer sends flagsRaw.

  • #982 by @bobsingor – In design mode a restyled signature field shows its new look at once and keeps it, instead of flashing it and going back. A signature field with a mark in it is drawn only by its picture.

@embedpdf/plugin-i18n@3.0.0-next.23

Minor Changes

  • #1004 by @bobsingor – A fallback language in loaders now loads at the start, and a language shows once it and the fallback language are in, so a lazy fallback language no longer shows keys in place of its strings. Until then the fallback language shows, or, while that loads too, the first language in locales. A language in both locales and loaders shows its locales strings until its loader has run, and the loader's language then replaces them. When the fallback language can't load, onLocaleLoadFailed fires and languages show without it.

  • #1006 by @bobsingor – interpolate(text, params) fills a string's {name} slots as t() does, for text that has no translation. TranslateOptions.params takes a readonly record.

Patch Changes

  • #1000 by @bobsingor – Follows core's settings events (changedKeys).

@embedpdf/plugin-interaction@3.0.0-next.23

Minor Changes

  • #1000 by @bobsingor – An InteractionHandler says onPointerDown, onPointerMove, onPointerUp and onPointerCancel, as a Tool does (was onDown, onMove, onUp, onCancel).

Patch Changes

  • #1003 by @bobsingor – Follows core-geometry: Rotation.

@embedpdf/plugin-link@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – Read shapes are readonly.

  • #1000 by @bobsingor – readAllLinks() replaces listAllLinks(): a read from the engine is read*. LinkActivation is tagged status, as every call result is (was outcome).

@embedpdf/plugin-measurement@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – Read shapes are readonly.

Patch Changes

  • #1000 by @bobsingor – Follows core's settings events (changedKeys) and mirror specs (onChanged).

@embedpdf/plugin-render@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The format and quality settings read null while the engine chooses, so updateSettings({ format: null }) gives the choice back; they used to read undefined, which a change could never set. snapshot.box is one look: a change replaces it whole, and a color it leaves out follows the accent again.

  • #1003 by @bobsingor – The full-page and tile settings types are FullPageSettings and TilesSettings (were …Options).

  • #1000 by @bobsingor – The tile settings name their units: bleedPx and engageRatio (were bleed and engageAt). Results say mimeType. The host contract's view demand ends with destroy(), and getKeptAppearances() starts with a verb.

@embedpdf/plugin-search@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – highlight.blendMode is engine-core's BlendMode; the SearchBlendMode copy is gone.

  • #1000 by @bobsingor – refresh() resolves nothing, as every plugin's does; the result is in the state and the events.

Patch Changes

  • #983 by @bobsingor – A search asks for snippets only when the session may copy text (doc.text.copy). Before, it always asked for them first and, when refused, searched again without them: two requests for every search in a session without copy rights. findAll(query, { snippets: true }) now refuses with permission-denied (naming doc.text.copy) without asking the engine. If the engine still refuses snippets the session looked allowed to have, the search falls back to matches without them as before.

@embedpdf/plugin-selection@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – SelectionHandleGeometry and selectionHandleGeometry() replace the …Geom names. Read shapes are readonly.

  • #1000 by @bobsingor – The drag setting names its unit: dragThresholdPx.

@embedpdf/plugin-signature@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – getSignature() returns SignatureInfo, as listSignatures() does: the field's facts and its verdict (null until checked, or for an unsigned field). The PreparedSignature alias is gone: prepareSignature() resolves SignaturePrepared.

  • #1000 by @bobsingor – refresh() resolves nothing, as every plugin's does. The signing key is signingKey (setting and sign() option) and its type SigningKey (were key and SignatureKey: in naming.md a key is a lookup key). PlaceMarkResult is tagged status, as every call result is (was kind). validate() takes validationTime (was at).

Patch Changes

  • #1002 by @bobsingor – Follows engine-core: form fields are tagged kind.

@embedpdf/plugin-stage@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – reveal()'s rect is rect?: Rect: left out is the whole page, and null is no longer taken. A zoomBox change that gives a color as undefined follows the accent, instead of storing undefined.

  • #1003 by @bobsingor – Read shapes are readonly, the settings included. Follows core-geometry and core-stage: Rotation, PageGeometry.

  • #1000 by @bobsingor – StageViewState.pageIndex replaces cursor. getPageBox() replaces getPageFrame(), since PageFrame is a setting. A reveal's alignment is align?: RevealAlignment, its values ArrivalAlignValue (were anchor, RevealAnchor and RevealAnchorValue, a copy of it). Settings events carry changedKeys.

@embedpdf/plugin-stamp@3.0.0-next.23

Minor Changes

  • #1003 by @bobsingor – createAsset() takes CreateAssetInput (was AddAssetInput). Read shapes are readonly.

  • #1000 by @bobsingor – getAssetBytes() replaces readAssetBytes(): it's synchronous. StampLibraryChangedEvent is tagged type (was reason) and says 'asset-created', 'asset-deleted' and 'deleted', as onAssetCreated, onAssetDeleted and onLibraryDeleted do. ImportLibraryOptions.assetKind replaces kind, which CreateLibraryOptions uses for the library's.

@embedpdf/plugin-view-manager@3.0.0-next.23

Minor Changes

  • #1000 by @bobsingor – deletePane(), DeletePaneOptions, onPaneDeleted and PaneDeletedEvent pair with createPane() (were removePane, RemovePaneOptions, onPaneRemoved and PaneRemovedEvent).

@embedpdf/viewer-chrome@3.0.0-next.23

Minor Changes

  • #999 by @bobsingor – The viewer takes null for identity and scope, as its settings read them: identity: null is nobody, and scope: null lets the user do everything.

  • #1003 by @bobsingor – A viewer command is a CommandDefinition (was CommandDef).

  • #1006 by @bobsingor – A command of yours can have labelParams, which gets the same context as enabled: plugins by name through get, your appState, the document and the viewer. Its values fill the {name} slots in the command's label, and a number count picks the plural form of translated words.

  • #1004 by @bobsingor – strings takes a language's words as a function that loads them the first time the language shows, and plugins.i18n.fallbackLocale sets the fallback language, also shown when the browser asks for none of the viewer's languages. plugins.i18n takes only fallbackLocale. document:download saves the document under its name.

  • #1000 by @bobsingor – ViewerLifetime.destroy() replaces dispose(). The signature setting's key is signingKey.

  • #1011 by @bobsingor – Selected redaction marks can be applied from the annotation bar: its new annotation:apply-redaction command shows when every selected annotation is a redaction mark, and asks first in the same confirmation as redaction:apply, counting only those marks and the other annotations under them. The confirmation's title takes plural forms in strings now (demo.redactConfirmTitle), and the command's label is commands.redact.apply, such as { one: 'Apply Redaction', other: 'Apply {count} Redactions' }.

Patch Changes

  • #1009 by @bobsingor – A comment without an author shows as "Guest" instead of "Unknown", in every language, as it did in v2.

  • #997 by @bobsingor – The attachments panel reads a file's sizeBytes.

  • #1001 by @bobsingor – On a phone, a submenu opened in a menu's sheet covers the menu under it completely. Before, once it finished sliding in, the rows of the menu under it that open submenus showed through its top rows.

  • #1002 by @bobsingor – Follows engine-core: form fields are tagged kind.

  • #1007 by @bobsingor – Counts read right in every language: the number of files and comments, search results, redaction marks and selected annotations each pick their language's plural form, such as Polish's few and many and Arabic's six forms, instead of choosing between a singular and a plural word or a "Label: 3" wording. attachments.countPlural and comments.countPlural are gone: attachments.count, comments.count, demo.searchResults, demo.redactConfirmBody, demo.redactConfirmCollateral and stylePanel.selected take plural forms in strings, such as { one: '{count} file', other: '{count} files' }.

@embedpdf/viewer@3.0.0-next.23

Minor Changes

  • #1004 by @bobsingor – strings takes a language's words as a function too, such as sv: () => import('./sv.json'): they load the first time the viewer shows that language, which shows once they're in. plugins.i18n.fallbackLocale sets the fallback language, one of the viewer's or one of yours: the language a browser gets when the viewer has none of its languages, and where every word the current language doesn't have comes from. It loads at the start. plugins.i18n takes only fallbackLocale now; the languages are locale and strings, and other keys are left out with a warning. The viewer's English words ship as @embedpdf/viewer/strings/en.json, to start a translation from. A download is saved under the document's name instead of document.pdf.

Patch Changes

  • #1003 by @bobsingor – Follows the viewer chrome: CommandDefinition.

  • #1000 by @bobsingor – Follows the viewer chrome: the signature setting's key is signingKey.

@cloudpdf/server-modules@3.0.0-next.23

Patch Changes

  • #997 by @bobsingor – The test server seeds its documents with the init request's sizeBytes.

  • #1002 by @bobsingor – The test server reads the init answer's status.

@embedpdf/core-fonts@3.0.0-next.23

Patch Changes

  • #997 by @bobsingor – A built-in program's facts say displaySha256.

@embedpdf/engine@3.0.0-next.23

Patch Changes

  • #997 by @bobsingor – Asks the worker for a font program by its displaySha256.

  • #1005 by @bobsingor – Follows engine-core: permissions are named flags.

  • #1003 by @bobsingor – Follows engine-core's names. createLocalEngine(options) and the other factories take options.

  • #1000 by @bobsingor – Follows engine-core: encoded pictures say mimeType.

@embedpdf/plugin-history@3.0.0-next.23

Patch Changes

  • #1000 by @bobsingor – Follows core's changes.listPending().

@embedpdf/plugin-metadata@3.0.0-next.23

Patch Changes

  • #1000 by @bobsingor – Follows core's mirror specs (onChanged).

@embedpdf/plugin-outline@3.0.0-next.23

Patch Changes

  • #997 by @bobsingor – Reads a mutation's changedRefs.

  • #1000 by @bobsingor – Activating an item resolves a LinkActivation tagged status. Follows core's mirror specs (onChanged) and pagesSequence.

@embedpdf/plugin-redaction@3.0.0-next.23

Patch Changes

  • #1000 by @bobsingor – Follows core's settings events (changedKeys).

@embedpdf/viewer-react@3.0.0-next.23

Patch Changes

  • #1003 by @bobsingor – Follows the plugins' names.

@cloudpdf/web@3.0.0-next.23

@cloudpdf/plugin-protected-display@3.0.0-next.23

@cloudpdf/viewer-angular@3.0.0-next.23

@cloudpdf/viewer@3.0.0-next.23

@cloudpdf/viewer-react@3.0.0-next.23

@cloudpdf/viewer-svelte@3.0.0-next.23

@cloudpdf/viewer-vue@3.0.0-next.23

@embedpdf/engine-runtime@3.0.0-next.23

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.23

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.23

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.23

@embedpdf/engine-runtime-linux-x64@3.0.0-next.23

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.23

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.23

@embedpdf/engine-runtime-wasm32@3.0.0-next.23

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.23

@embedpdf/engine-runtime-win32-x64@3.0.0-next.23

@embedpdf/plugin-page-edit@3.0.0-next.23

@embedpdf/plugin-shell@3.0.0-next.23

@embedpdf/viewer-angular@3.0.0-next.23

@embedpdf/viewer-svelte@3.0.0-next.23

@embedpdf/viewer-vue@3.0.0-next.23

20 days ago
embed-pdf-viewer

Release Next v3.0.0-next.22

@cloudpdf/contract@3.0.0-next.22

Minor Changes

  • #978 by @bobsingor – Every markup annotation carries richText, its comment with formatting, or null for a plain comment, in reads, creates and updates. The rich text model is named once, as RichTextDocument and RichTextDocumentInput.

  • #967 by @bobsingor – deployment.modules (GET /v1/deployment/modules, API token) lists the installed server modules: ModuleManifest with its ModulePermissions and ModuleMeters, all named components. tenants.usage takes from and to (UTC days, to the day after the last) in place of period, and its metrics hold modules' meters next to the core's.

  • #971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation's color may be null: no stroke. A read gives null for a file's empty or missing stroke color.

Patch Changes

  • #972 by @bobsingor – dashArray on an annotation's create and update and on a widget placement takes at least one length (minItems: 1): an empty pattern is refused.

@cloudpdf/sdk@3.0.0-next.22

Minor Changes

  • #978 by @bobsingor – Annotations, drafts and patches of every markup kind have richText, the comment with formatting (RichTextDocument, RichTextDocumentInput), or null for a plain comment.

  • #967 by @bobsingor – deployment.modules() lists the installed server modules: their names, permissions and meters. tenants.usage takes from and to for a window of UTC days, and its metrics include modules' meters.

  • #971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation's color may be null: no stroke.

@cloudpdf/server@3.0.0-next.22

Minor Changes

  • #967 by @bobsingor – Modules describe themselves, and count their usage. A module has a name (required) and a description, and declares meters (each with a label and a unit) that its routes count with req.meters.count(meter, { oncePerDay }) for the document's tenant. A permission can say how it relates to the core's: replaces (protected-display.view replaces doc.render) and bypassedBy (doc.download…), facts for a grant dialog that the server doesn't enforce; a token may hold a permission and the one it replaces, and the core one has its usual effect. GET /v1/deployment/modules lists the installed modules as they declare themselves, with the API token. Tenant usage is counted per UTC day: tenants.usage takes from and to in place of period, and reports each installed module's meters next to the core's. Migration 051 moves the counters to days (a month counted before keeps its total on its first day) and keeps the once-a-day keys as hashes, swept when the day is over.

@cloudpdf/server-modules@3.0.0-next.22

Minor Changes

  • #967 by @bobsingor – defineServerModule takes a name (required), a description and meters; a request counts the module's meters with req.meters.count(meter, { oncePerDay }). Permissions take replaces and bypassedBy. startTestServer's tenant has the given modules turned on, so their routes answer instead of 403 FeatureNotEnabled.

@embedpdf/core-annotation@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – A record changes its kind to a sibling: withValues takes a subtype the annotation can become now (canChangeKind; not when it's locked), and the patch and the pending view are the new kind's. setFields gives it only to annotations people may change by hand as the new kind too, so a mixed selection changes the ones that can and restyles the rest. New selectionProperties(model, annotations): the properties a style panel shows for selected annotations, led by a subtype choice (label annotation.style.kind, each kind named as the comment list names it) when they are kinds of one group and each can change kind.

  • #975 by @bobsingor – New typeWithStyle(before, after, at, style): the text typed at a caret takes a style chosen there, a line break carries the style on to the next line, and any other edit drops it. New restyleRuns(doc, change) and withoutStyle(style, keys) change every run's own style. A whole free text restyled by hand now restyles all of its text: setTextFormat and a font, size or text color in setFields set the body and take that property off every word that set its own, so a box typed bold from its first letter turns regular with one toggle.

  • #971 by @bobsingor – A style's color may be null: a shape or line drawn without a stroke. A color property's allowsNone says a panel may offer none, which writes null: on a shape's or line's stroke and fill, a text box's background, a redaction's fill and a form field's border and background.

    A line, polyline or ink at width 0 is drawn as a hairline (Paint.hairline), with the line endings a 1 pt line has, as the engine and Acrobat draw it.

Patch Changes

  • #971 by @bobsingor – Ink is drawn as Acrobat draws it: each stroke as the smooth curves Acrobat fits to its points (cubic Béziers, never more than about 1.4 points from any point), with round caps and no join, and a stroke of one point as a filled dot. Its box and hit testing follow those curves, so a live drawing looks the same as the appearance the engine writes.

@embedpdf/core-fonts@3.0.0-next.22

Minor Changes

  • #974 by @bobsingor – standardFontForFace moved to @embedpdf/engine-core/runtime, so the engine and the browser pick the standard font for a face with one function; it is no longer exported here.

@embedpdf/core-ui@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – A bar can sit by the snapshot tool's box: { at: 'snapshot' }, beside { at: 'selection' } and { at: 'annotation' }.

@embedpdf/engine-core@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – An update can change an annotation's kind to a sibling: a highlight, underline, squiggly line or strikeout into another of the four, and a square into a circle and back, the kinds ISO 32000-2 describes with one table of entries. New siblingKindsOf(subtype) lists the kinds an annotation can become, canChangeKind(annotation, subtype) says whether it can become one now, and fieldTheKindCannotHold(annotation, subtype) names the value in the way. The patch is the new kind's patch, checked against its schema, and the annotation stays itself: its ref, nm, replies, popup, group and author. Any other subtype is refused with InvalidArg (details.field 'subtype'), naming the kinds it can become. A value the new kind has no field for is refused, never dropped (details.field names it): clear it first, in the same change, as a replacement's strikeout clears its intent.

    applyAnnotationPatch and mergeAnnotationPatch predict the new kind, a field only it has reading null, and annotationPatchBetween states subtype when the kind changed.

  • #974 by @bobsingor – Latin a font lacks is never a box. After the fallback fonts, the engine draws a character the run's font doesn't have in the standard font that stands in for that font, in its weight and italic (Times for Times New Roman, Courier for Courier New, Helvetica for any other), and only then in the last resort. doc.fonts.resolve() says so: each run's fallbacks ends with that standard font's program, unless the run is drawn in it. standardFontForFace(face), the rule that picks it, is exported from @embedpdf/engine-core/runtime.

  • #978 by @bobsingor – Every markup annotation has richText, its comment with formatting (/RC, ISO 32000-2 §12.5.6.2): a note, a highlight, a shape, a line, ink, a stamp, a caret, a file attachment or a redaction. It is the RichTextDocument a free text has, or null when the comment is plain text, and contents is its plain projection. A create or update with richText brings its contents; contents alone on a formatted comment replaces its paragraphs with plain ones and keeps its body; richText: null keeps the text and drops the formatting. contents and richText given together must say the same text, line breaks however spelled, for every kind. Links, popups and widgets have no richText. The rich text schemas are named RichTextDocument and RichTextDocumentInput among the annotation wire components.

  • #971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation takes color: null for no stroke, and keeps its strokeWidth. A shape whose file gives it no stroke color reads color: null. runNoStrokeConformance and NO_STROKE_FIXTURE_PDF check both engines read, write and draw it as Acrobat does.

Patch Changes

  • #972 by @bobsingor – A dashed border whose dashArray is left out, on create or by an update that makes it dashed while it has no pattern, now states the default [3, 3] and reads it back, for every kind with a border and for widget placements. The pattern is written into the file because Acrobat redraws a dashed border whose file names none as a solid line. dashArray: null is no pattern: written as none, it reads back null. A write refuses an empty dashArray: an empty pattern is a solid line, which is borderStyle: 'solid'.

@embedpdf/engine@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – page.annotations.update() changes an annotation's kind to a sibling: a highlight, underline, squiggly line or strikeout into another of the four, a square into a circle and back. It stays the same annotation, with its ref, replies, popup, group and author, and undo turns it back. Any other subtype is refused with InvalidArg, and so is a value the new kind has no field for: clear it first, in the same change.

@embedpdf/engine-runtime@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – The runtime has EPDFAnnot_SetSubtype: an annotation's kind changed in place, its /Subtype written and every other entry kept.

  • #974 by @bobsingor – The runtime draws Latin a font lacks in the standard font that stands in for that font (its own standard family, else Helvetica, in its weight and italic), after the fallback fonts and before the last-resort box, in free text, form fields and redaction labels: text in a font without Latin, such as Noto Sans Hebrew, keeps its Latin letters. A registered font's /BaseFont is its PostScript name rather than the family it was registered under, so two weights of one family are two fonts in the PDF and in EPDFFont_GetPostScriptName(); a variable-font instance is named as the font names that instance, and each subset has its own tag.

  • #971 by @bobsingor – A square, circle, polygon, polyline, line or ink whose /C is empty or left out draws no stroke, as Acrobat does: the fill alone, still inset half the border width, and only the filled line endings. A line, polyline or ink at border width 0 draws a hairline. Adds the EPDFAnnot_SetNoColor binding, which writes a color entry as an empty array.

Patch Changes

  • #971 by @bobsingor – An ink annotation's appearance draws each stroke as Acrobat does: the cubic Béziers Acrobat fits to its points, never more than about 1.4 points from any of them, with round caps and no join, and a stroke of one point as a dot of radius 0.5. /Rect follows the curves.

  • #972 by @bobsingor – An empty dash pattern (/BS /D []) is a solid line, as ISO 32000 says: a shape's, line's, ink's or form widget's border with one draws no dashes and reads solid. A dashed border without /D still draws the default dash.

@embedpdf/engine-services@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – An update with a sibling subtype writes the annotation as its new kind: its /Subtype, its fields as the new kind's, and an appearance drawn as one. Undo puts the old kind back, also when the annotation changed since.

  • #978 by @bobsingor – A markup annotation's comment reads and writes as rich text: richText reads its /RC (null without one) and a write sets /RC and /Contents together, as Acrobat writes a note's, without touching its appearance. Writing contents alone on a formatted comment rewrites its /RC too, so other PDF apps no longer show the old text. A comment body that names no font reads as Helvetica, and is written back naming none. A redaction's overlay font is read from its /DA alone, so a comment in another font no longer changes it.

  • #971 by @bobsingor – color: null on a square, circle, polygon, polyline, line or ink is written as /C [], the empty color ISO 32000 defines as no color. A shape whose /C is empty or left out reads color: null, where it read red before.

@embedpdf/angular@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – New <epdf-snapshot-layer> in /render: the snapshot tool's box on each page, in the snapshot.box colors. New <epdf-snapshot-menu>: your UI by the snapshot, once it's taken. EpdfRender has canSnapshot(), getSnapshot(), clearSnapshot() and snapshotChanged$. copyImage comes from /runtime, beside saveFile.

@embedpdf/react@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – New <SnapshotLayer> in /render: the snapshot tool's box on each page, in the snapshot.box colors. New <SnapshotMenu>: your UI by the snapshot, once it's taken. New useSnapshot(): the snapshot the tool holds, or null. copyImage comes from /runtime, beside saveFile.

@embedpdf/svelte@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – New <SnapshotLayer> in /render: the snapshot tool's box on each page, in the snapshot.box colors. New <SnapshotMenu>: your UI by the snapshot, once it's taken. New useSnapshot(): the snapshot the tool holds, or null. copyImage comes from /runtime, beside saveFile.

@embedpdf/vue@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – New <SnapshotLayer> in /render: the snapshot tool's box on each page, in the snapshot.box colors. New <SnapshotMenu>: your UI by the snapshot, once it's taken. New useSnapshot(): the snapshot the tool holds, or null. copyImage comes from /runtime, beside saveFile.

@embedpdf/web@3.0.0-next.22

Minor Changes

  • #975 by @bobsingor – The rich text editor keeps up with fast typing: an update that brings back text the editor already reported is late, not a change, so it no longer undoes the keystrokes typed after it. RichTextEditorHost.onInput may return the document the host keeps (text typed at the caret in a style chosen there), which the editor shows at once, and TextBoxEditorAnnotation.draftRichText returns it. A format shortcut reports the selection as it is before the command runs, and the caret is reported once an input method composition ends instead of while it moves through it.

  • #971 by @bobsingor – A scene paint's hairline draws a stroke one pixel wide at any zoom: a line, polyline or ink at width 0, as the engine and Acrobat draw it.

  • #980 by @bobsingor – New copyImage(image): copies a picture to the clipboard as PNG, starting the write at once, so it works in a click before the picture is there (Safari copies only then). New snapshotBoxPaint and SNAPSHOT_BOX_DASH, the look of the snapshot tool's box, with the --epdf-snapshot-box-fill and --epdf-snapshot-box-stroke variables. standardCommandsBrowser has copyImage, and its saveFile takes the content type.

@embedpdf/plugin-annotation@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – selection.update({ subtype }) changes each selected annotation that can become that kind, as the same annotation, and the rest keep theirs. selection.getProperties() leads with a subtype choice when the selection's kinds are siblings that can change kind (not a replacement's strikeout), offering the kinds people may change by hand.

  • #975 by @bobsingor – The caret works as in a word processor. With a caret in a text box, selection.getProperties() reports the text typed next: the style of the text before the caret (at the start of a line, the text after it). text.toggleFormat() and a font, size or color from selection.update() at a caret style the text typed next, without writing anything, and moving the caret drops that style. A selected box reads all of its text, so bold shows only when every word is bold, and a change styles all of it, a word with its own style included. text.toggleFormat() turns a format on unless all of the text already has it, so words that disagree all take it. A box restyled while it is already drawn live now draws in its new font at once, not in the font answer for its old style.

  • #971 by @bobsingor – A shape or line tool's defaults may set color: null, so the tool draws without a stroke.

Patch Changes

  • #974 by @bobsingor – A free text box restyled after it was typed in is drawn in its new font at once: the fonts the engine answered for its old font no longer draw its body while its other runs follow the new one. An answer holds for the faces it was asked about; a box whose faces change is asked again, and typing keeps the answer.

@embedpdf/plugin-commands@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – New standard commands: tool:snapshot, not allowed without doc.content.copy (commands.notAllowed.doc-content-copy); snapshot:copy (Mod+C), snapshot:save (a PNG named after the document and the page) and snapshot:clear (Escape), each enabled while there is a snapshot. StandardCommandsPlatform has copyImage(image), and saveFile takes the file's content type. Commands that share a key take turns: a key runs the one that can run now, wherever it is in the list, so Escape lets a snapshot go even though cancelling a drawing has Escape too.

@embedpdf/plugin-i18n@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – Labels for the snapshot tool and its commands (commands.tool.snapshot, commands.snapshot.copy, .save, .clear) in every language.

@embedpdf/plugin-render@3.0.0-next.22

Minor Changes

  • #980 by @bobsingor – renderPage renders part of a page: rect, in page space, cut at the page's edge (one that misses the page is invalid-input), sized by width or scale. rotation turns the picture. Either one renders for its caller alone, outside the layers' cache. New snapshot tool, added when the interaction plugin is there: drag a box on a page, or click for the whole page, and the box is held as the snapshot, { page, rect, image }, its picture a PNG at snapshot.scale (default 2) pixels per point, turned as the page is shown, made smaller to fit 16 million pixels or the deployment's budget, and rendered once every change made before it is in. New canSnapshot() (doc.render and doc.content.copy), getSnapshot(), clearSnapshot(), onSnapshotChanged, the snapshot settings (scale, box.fill, box.stroke) and, on the host lens, getSnapshotBox(page).

@embedpdf/viewer-chrome@3.0.0-next.22

Minor Changes

  • #973 by @bobsingor – The style panel has a Type row for a selected highlight, underline, squiggly line or strikethrough, and for a square or circle: one button per kind it can become, each with its tool's icon. Picking one changes the annotation's kind in place, with its comment and replies. The annotation.style.kind label is translated into every viewer language.

  • #971 by @bobsingor – The style panel offers no color for a shape's or line's stroke and for a form field's border, as it does for fills.

  • #980 by @bobsingor – Take a Snapshot, in the document menu: drag a box over a page, or click a page for all of it, and a bar under the box copies the picture (Ctrl/Cmd+C) or saves it as a PNG; Escape lets it go. New commands tool:snapshot, snapshot:copy, snapshot:save and snapshot:clear, the snapshot bar, and the snapshots feature for disable. A PDF that forbids copying has no Take a Snapshot. In all fifteen languages.

Patch Changes

  • #970 by @bobsingor – The style panel's font picker offers only the fonts new text can be written in. A document font that can't be chosen (one the PDF holds only the characters of, a Type 3 font, one licensed for viewing only) is no longer listed greyed; the box that has it still shows it as its font, with why it can't be chosen for another box.

@embedpdf/plugin-fonts@3.0.0-next.22

Patch Changes

  • #974 by @bobsingor – A font's CSS and a box's paint fonts end their fallbacks with the standard font that stands in for the font, as the engine writes them: Latin a font lacks (Noto Sans Hebrew has none) shows in Helvetica, in the same weight, never as boxes.

@cloudpdf/engine@3.0.0-next.22

@cloudpdf/web@3.0.0-next.22

@cloudpdf/plugin-protected-display@3.0.0-next.22

@cloudpdf/viewer-angular@3.0.0-next.22

@cloudpdf/viewer@3.0.0-next.22

@cloudpdf/viewer-react@3.0.0-next.22

@cloudpdf/viewer-svelte@3.0.0-next.22

@cloudpdf/viewer-vue@3.0.0-next.22

@embedpdf/core-acrojs@3.0.0-next.22

@embedpdf/core-form@3.0.0-next.22

@embedpdf/core-geometry@3.0.0-next.22

@embedpdf/core-js-sandbox@3.0.0-next.22

@embedpdf/core@3.0.0-next.22

@embedpdf/core-signature@3.0.0-next.22

@embedpdf/core-stage@3.0.0-next.22

@embedpdf/core-text@3.0.0-next.22

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.22

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.22

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.22

@embedpdf/engine-runtime-linux-x64@3.0.0-next.22

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.22

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.22

@embedpdf/engine-runtime-wasm32@3.0.0-next.22

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.22

@embedpdf/engine-runtime-win32-x64@3.0.0-next.22

@embedpdf/plugin-actions@3.0.0-next.22

@embedpdf/plugin-attachment@3.0.0-next.22

@embedpdf/plugin-form@3.0.0-next.22

@embedpdf/plugin-history@3.0.0-next.22

@embedpdf/plugin-interaction@3.0.0-next.22

@embedpdf/plugin-link@3.0.0-next.22

@embedpdf/plugin-measurement@3.0.0-next.22

@embedpdf/plugin-metadata@3.0.0-next.22

@embedpdf/plugin-outline@3.0.0-next.22

@embedpdf/plugin-page-edit@3.0.0-next.22

@embedpdf/plugin-redaction@3.0.0-next.22

@embedpdf/plugin-search@3.0.0-next.22

@embedpdf/plugin-selection@3.0.0-next.22

@embedpdf/plugin-shell@3.0.0-next.22

@embedpdf/plugin-signature@3.0.0-next.22

@embedpdf/plugin-stage@3.0.0-next.22

@embedpdf/plugin-stamp@3.0.0-next.22

@embedpdf/plugin-view-manager@3.0.0-next.22

@embedpdf/viewer-angular@3.0.0-next.22

@embedpdf/viewer@3.0.0-next.22

@embedpdf/viewer-react@3.0.0-next.22

@embedpdf/viewer-svelte@3.0.0-next.22

@embedpdf/viewer-vue@3.0.0-next.22

21 days ago
embed-pdf-viewer

Release Next v3.0.0-next.21

@cloudpdf/contract@3.0.0-next.21

Minor Changes

  • #956 by @bobsingor – tenants.update (PATCH /v1/tenants/:tenantId) sets a tenant's features, the server modules it may use, and tenant records carry features. TenantFeature ({ id, stopped?: 'cap' }) is a named component.

@cloudpdf/sdk@3.0.0-next.21

Minor Changes

  • #956 by @bobsingor – tenants.update({ tenantId, features }) sets the server modules a tenant may use, and tenant records have features.

@cloudpdf/server@3.0.0-next.21

Minor Changes

  • #964 by @bobsingor – A Postgres connection that fails while idle in the pool no longer crashes the server. A database restart or failover, pg_terminate_backend, or a proxy closing the connection used to reach Node as an uncaught error event from pg.Pool. The pool now drops that connection and opens a new one for the next query. createPostgresDb takes onIdleConnectionError to report these, and cloudpdf-server logs each one's message as a warning.

  • #955 by @bobsingor – buildApp takes the deployment's license as license: the runtime createLicenseRuntime made, and nothing else. It replaces licenseGate. Any other object, including a copy of a runtime, stops the build with an error naming createLicenseRuntime. The runtime is sealed: its methods can't be replaced, and buildApp enforces the license from the runtime behind it. createLicenseRuntime takes only db, env, secretResolver and startTimer, and passes nothing else on, so license verification always uses the identity compiled into the package.

  • #956 by @bobsingor – Tenants have features: the server modules each tenant may use, by module id. A module's routes answer only tenants whose features hold it; others get 403 FeatureNotEnabled, and a feature held as { id, stopped: 'cap' } answers 402 FeatureStopped. A new tenant has none: the operator turns modules on per tenant with PATCH /v1/tenants/:tenantId (API token only, every id an installed module), and other replicas follow within 30 seconds. Migration 050 adds the column on SQLite and Postgres.

@cloudpdf/server-modules@3.0.0-next.21

Minor Changes

  • #955 by @bobsingor – Test a module in a real server from published packages: startTestServer from @cloudpdf/server-modules/testing starts @cloudpdf/server with your modules mounted, on 127.0.0.1 with its own in-memory database, files and credentials, licensed by a development key (CLOUDPDF_LICENSE_KEY or licenseKey). addDocument(pdf) uploads a PDF through the server's upload API and answers its id and page keys; fetch(doc, path, { scope }) calls a route on the document's layer with a viewer token for exactly that scope; token() signs that token for a client of your own; apiToken calls as the deployment; close() removes everything. The kit also exports HostedModule, the type defineServerModule returns, so a module's declarations build with the kit as its only dependency.

@embedpdf/core-ui@3.0.0-next.21

Minor Changes

  • #957 by @bobsingor – A floating bar's place takes hideWhenIdle (FloatPlace) in place of hideWhileScrolling, and hideWhenIdleOf(data, id) reads it in place of hideWhileScrollingOf, through the bar it rides along: the bar rests out of sight while nothing moves, instead of hiding while the pages scroll.

@embedpdf/angular@3.0.0-next.21

Minor Changes

  • #957 by @bobsingor – The Stage ref from @embedpdf/angular/stage has listCurrentPages(): the pages you're on, the current spread while it fits across the view, else the current page.

@embedpdf/plugin-stage@3.0.0-next.21

Minor Changes

  • #958 by @bobsingor – In paged flow, pushing past the edge of the page turns it, as readers expect from a wheel, a trackpad and a finger. Scroll or swipe past the bottom for the next page, at its top; past the top for the previous page, at its bottom; or swipe sideways past the edge (the other way in a right-to-left document). A tall page stops at its bottom first, and the next push turns it. One gesture turns one page, and its momentum doesn't scroll the page that arrives. The new turnGestures setting (default true) turns this off, leaving page turns to nextPage(), previousPage() and navigation. Nothing changes in continuous flow.

  • #957 by @bobsingor – listCurrentPages() gives the pages you're on: the current spread while it fits across the view, its two pages side by side however tall they are, else the current page alone. nextPage() and previousPage() step past those pages, and canGoNext() and canGoPrevious() say whether there's a page after or before them. A spread that fits across the view but is taller than it used to step one page at a time, so Next from 1–2 went to page 2, already on screen, and nothing moved; and on the second page of the first or last spread, Previous or Next was enabled and did nothing. A spread that fits across the view also lands at its top, like a page.

@embedpdf/viewer-chrome@3.0.0-next.21

Minor Changes

  • #958 by @bobsingor – The View menu's Scrolling group gains Page by page (view:scroll-paged, icon pageByPage), next to Vertical and Horizontal: one page or spread at a time, turned by scrolling or swiping past its edge. Vertical and Horizontal now also switch back to scrolling every page, and a lock on flow or layout greys them out. The label is in all 15 languages.

  • #957 by @bobsingor – The page number:

    • The pager bar holds the previous and next page buttons around the page number, one group that never moves into "More". The number and the count are one button, "3 / 12", that turns the number into a field to type a page: pageNumber.page and pageNumber.pages say {current} / {total} and {first}–{last} / {total} in every language. It names the pages the buttons step past, the Stage's listCurrentPages(): "2–3 / 12" while a spread fits across the view, so Next goes to 4–5, and the one page once you zoom in past it. A document of one page has no page number, and page:next, page:previous, page:first and page:last don't show for it.
    • A floating bar whose place says hideWhenIdle: true, and by default the bar with the page number, at every size, fades out once the pages and the pointer have been still for two seconds, and comes back when the pages move, the pointer moves over them or presses them, or the keyboard reaches it. It stays while the pointer is on it, while you're using it from the keyboard or typing in it, and while a menu from it is open. Out of sight it takes no clicks and keeps its place in the keyboard's order. hideWhileScrolling is gone.
    • A floating bar's corners follow the theme's radius, like its buttons, instead of being round.
    • A command's chevron to the next or previous page points the other way in a right-to-left language, in a bar, a menu and a strip bar, where the row mirrors.
  • #963 by @bobsingor – The strip over selected text sits below it, as the annotation strip does, and above it only when there's no room below. Its menus open on the strip's side, away from the text.

  • #963 by @bobsingor – The style panel shows only styles: the flags section (/F) is gone, with its title and hints (annotationFlags.*) in the language packs. A selection with nothing to style shows the panel's empty state.

Patch Changes

  • #952 by @bobsingor – The spinner on a page whose picture is on its way turns in place. It slid across the page instead, because its placement and its spin shared one transform. The page-loading part is still the circle, so restyling it works as before.

@embedpdf/viewer@3.0.0-next.21

Minor Changes

  • #957 by @bobsingor – The page number floating over the pages has previous and next page buttons around it, reads "3 / 12", and draws nothing for a document of one page. With pages side by side it reads "2–3 / 12" while the spread fits across the view, and Next goes to the next spread; zoomed in past it, it names the one page, and Next goes to the page beside it. It fades out once the pages and the pointer have been still for two seconds, at every size, and comes back when they move or the keyboard reaches it; a floating bar of yours does the same with hideWhenIdle: true in its place, which replaces hideWhileScrolling. Floating bars have the theme's corners instead of round ones.

  • #963 by @bobsingor – The bar over selected text sits below it, like the one over a selected annotation, and above it only without room below. The style panel no longer shows an annotation's flags; the annotationFlags.* keys in strings are gone with it.

@embedpdf/engine-services@3.0.0-next.21

Patch Changes

  • #950 by @KleiKodesh – An /XYZ destination that leaves out trailing parameters, such as [page /XYZ 10 700], keeps the left and top it has instead of reading all three as null. /XYZ is now read through FPDFDest_GetView and the null-parameter mask like every other view type. A 0 zoom still reads as null, which means the same.

@embedpdf/web@3.0.0-next.21

Patch Changes

  • #962 by @bobsingor – createSurfaceFocusFollower() puts the cursor in its element without scrolling. A panel that takes focus as it opens, such as Find, no longer shifts the page around the viewer sideways when the viewer sits in a box that can scroll, such as one with overflow: hidden and content off to one side.

@cloudpdf/engine@3.0.0-next.21

@cloudpdf/web@3.0.0-next.21

@cloudpdf/plugin-protected-display@3.0.0-next.21

@cloudpdf/viewer-angular@3.0.0-next.21

@cloudpdf/viewer@3.0.0-next.21

@cloudpdf/viewer-react@3.0.0-next.21

@cloudpdf/viewer-svelte@3.0.0-next.21

@cloudpdf/viewer-vue@3.0.0-next.21

@embedpdf/core-acrojs@3.0.0-next.21

@embedpdf/core-annotation@3.0.0-next.21

@embedpdf/core-fonts@3.0.0-next.21

@embedpdf/core-form@3.0.0-next.21

@embedpdf/core-geometry@3.0.0-next.21

@embedpdf/core-js-sandbox@3.0.0-next.21

@embedpdf/core@3.0.0-next.21

@embedpdf/core-signature@3.0.0-next.21

@embedpdf/core-stage@3.0.0-next.21

@embedpdf/core-text@3.0.0-next.21

@embedpdf/engine-core@3.0.0-next.21

@embedpdf/engine@3.0.0-next.21

@embedpdf/engine-runtime@3.0.0-next.21

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.21

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.21

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.21

@embedpdf/engine-runtime-linux-x64@3.0.0-next.21

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.21

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.21

@embedpdf/engine-runtime-wasm32@3.0.0-next.21

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.21

@embedpdf/engine-runtime-win32-x64@3.0.0-next.21

@embedpdf/react@3.0.0-next.21

@embedpdf/svelte@3.0.0-next.21

@embedpdf/vue@3.0.0-next.21

@embedpdf/plugin-actions@3.0.0-next.21

@embedpdf/plugin-annotation@3.0.0-next.21

@embedpdf/plugin-attachment@3.0.0-next.21

@embedpdf/plugin-commands@3.0.0-next.21

@embedpdf/plugin-fonts@3.0.0-next.21

@embedpdf/plugin-form@3.0.0-next.21

@embedpdf/plugin-history@3.0.0-next.21

@embedpdf/plugin-i18n@3.0.0-next.21

@embedpdf/plugin-interaction@3.0.0-next.21

@embedpdf/plugin-link@3.0.0-next.21

@embedpdf/plugin-measurement@3.0.0-next.21

@embedpdf/plugin-metadata@3.0.0-next.21

@embedpdf/plugin-outline@3.0.0-next.21

@embedpdf/plugin-page-edit@3.0.0-next.21

@embedpdf/plugin-redaction@3.0.0-next.21

@embedpdf/plugin-render@3.0.0-next.21

@embedpdf/plugin-search@3.0.0-next.21

@embedpdf/plugin-selection@3.0.0-next.21

@embedpdf/plugin-shell@3.0.0-next.21

@embedpdf/plugin-signature@3.0.0-next.21

@embedpdf/plugin-stamp@3.0.0-next.21

@embedpdf/plugin-view-manager@3.0.0-next.21

@embedpdf/viewer-angular@3.0.0-next.21

@embedpdf/viewer-react@3.0.0-next.21

@embedpdf/viewer-svelte@3.0.0-next.21

@embedpdf/viewer-vue@3.0.0-next.21

22 days ago
embed-pdf-viewer

Release Next v3.0.0-next.20

The changelog information of each package has been omitted from this message, as the content exceeds the size limit.

@embedpdf/plugin-fonts@3.0.0-next.20

@cloudpdf/contract@3.0.0-next.20

@cloudpdf/engine@3.0.0-next.20

@cloudpdf/web@3.0.0-next.20

@cloudpdf/plugin-protected-display@3.0.0-next.20

@cloudpdf/sdk@3.0.0-next.20

@cloudpdf/server@3.0.0-next.20

@cloudpdf/server-modules@3.0.0-next.20

@cloudpdf/viewer-angular@3.0.0-next.20

@cloudpdf/viewer@3.0.0-next.20

@embedpdf/core-acrojs@3.0.0-next.20

@embedpdf/core-annotation@3.0.0-next.20

@embedpdf/core-fonts@3.0.0-next.20

@embedpdf/core-form@3.0.0-next.20

@embedpdf/core@3.0.0-next.20

@embedpdf/core-stage@3.0.0-next.20

@embedpdf/core-text@3.0.0-next.20

@embedpdf/core-ui@3.0.0-next.20

@embedpdf/default-fallback-fonts@1.0.0-next.1

@embedpdf/engine-core@3.0.0-next.20

@embedpdf/engine@3.0.0-next.20

@embedpdf/engine-runtime@3.0.0-next.20

@embedpdf/engine-services@3.0.0-next.20

@embedpdf/angular@3.0.0-next.20

@embedpdf/react@3.0.0-next.20

@embedpdf/svelte@3.0.0-next.20

@embedpdf/vue@3.0.0-next.20

@embedpdf/web@3.0.0-next.20

@embedpdf/plugin-actions@3.0.0-next.20

@embedpdf/plugin-annotation@3.0.0-next.20

@embedpdf/plugin-commands@3.0.0-next.20

@embedpdf/plugin-form@3.0.0-next.20

@embedpdf/plugin-page-edit@3.0.0-next.20

@embedpdf/plugin-render@3.0.0-next.20

@embedpdf/plugin-stage@3.0.0-next.20

@embedpdf/plugin-stamp@3.0.0-next.20

@embedpdf/viewer-angular@3.0.0-next.20

@embedpdf/viewer-chrome@3.0.0-next.20

@embedpdf/viewer@3.0.0-next.20

@embedpdf/viewer-react@3.0.0-next.20

@embedpdf/viewer-svelte@3.0.0-next.20

@embedpdf/viewer-vue@3.0.0-next.20

@cloudpdf/viewer-react@3.0.0-next.20

@cloudpdf/viewer-svelte@3.0.0-next.20

@cloudpdf/viewer-vue@3.0.0-next.20

@embedpdf/core-geometry@3.0.0-next.20

@embedpdf/core-js-sandbox@3.0.0-next.20

@embedpdf/core-signature@3.0.0-next.20

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.20

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.20

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.20

@embedpdf/engine-runtime-linux-x64@3.0.0-next.20

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.20

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.20

@embedpdf/engine-runtime-wasm32@3.0.0-next.20

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.20

@embedpdf/engine-runtime-win32-x64@3.0.0-next.20

@embedpdf/plugin-attachment@3.0.0-next.20

@embedpdf/plugin-history@3.0.0-next.20

@embedpdf/plugin-i18n@3.0.0-next.20

@embedpdf/plugin-interaction@3.0.0-next.20

@embedpdf/plugin-link@3.0.0-next.20

@embedpdf/plugin-measurement@3.0.0-next.20

@embedpdf/plugin-metadata@3.0.0-next.20

@embedpdf/plugin-outline@3.0.0-next.20

@embedpdf/plugin-redaction@3.0.0-next.20

@embedpdf/plugin-search@3.0.0-next.20

@embedpdf/plugin-selection@3.0.0-next.20

@embedpdf/plugin-shell@3.0.0-next.20

@embedpdf/plugin-signature@3.0.0-next.20

@embedpdf/plugin-view-manager@3.0.0-next.20

25 days ago
embed-pdf-viewer

Release Next v3.0.0-next.19

@cloudpdf/contract@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – Share links are grants. The operations are grants.* under /v1/tenants/{tenantId}/grants, the scope is grants.manage, and the public exchange is POST /v1/grant-sessions with { grant, passphrase }. Answers say grant/grants, the record says passphraseProtected, and create and update take passphrase. A grant has a name (1 to 100 characters, trimmed, or null). New grants are grt_…; shr_… ids keep working. The errors are GrantPassphraseRequired and GrantExpired, a layer names its grantId, and every Share* schema and type is Grant*.

@cloudpdf/engine@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – Opens a grant with open({ kind: 'grant', grant, passphrase }), and the document's grant is doc.grant. The client half is exchangeGrant, grantSessionSource, GrantSessionSource and GrantExchangeError, and it exchanges at /v1/grant-sessions.

@cloudpdf/sdk@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – client.shares is client.grants, with a grant's name and passphrase.

@cloudpdf/server@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – Share links are grants: routes under /v1/tenants/{tenantId}/grants, the grants.manage scope, and the public exchange at POST /v1/grant-sessions, which takes { grant, passphrase }. Migration 047 renames share_grants to grants and share_visitors to grant_visitors with their indexes and constraints, renames password_hash to passphrase_hash, and adds a grant's name. New grants are grt_…, and shr_… grants keep working. Session tokens name grant:<id>, and security_events records grant.created, grant.updated, grant.archived and grant.revoked.

@cloudpdf/viewer-angular@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document from a grant is src: { grant, passphrase, restart }; password stays the PDF's own. The exchange helpers are exchangeGrant, grantSessionSource and GrantExchangeError.

@cloudpdf/viewer@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document from a grant is src: { grant, passphrase, restart }; password stays the PDF's own. The exchange helpers are exchangeGrant, grantSessionSource and GrantExchangeError.

@cloudpdf/viewer-react@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document from a grant is src: { grant, passphrase, restart }; password stays the PDF's own. The exchange helpers are exchangeGrant, grantSessionSource and GrantExchangeError.

@cloudpdf/viewer-svelte@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document from a grant is src: { grant, passphrase, restart }; password stays the PDF's own. The exchange helpers are exchangeGrant, grantSessionSource and GrantExchangeError.

@cloudpdf/viewer-vue@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document from a grant is src: { grant, passphrase, restart }; password stays the PDF's own. The exchange helpers are exchangeGrant, grantSessionSource and GrantExchangeError.

@embedpdf/core@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – A document opened with a grant reports what it waits for as grantRequest, and retry() takes the grant's passphrase.

  • #923 by @bobsingor – createKernel({ fetch }) takes your own fetch for { kind: 'url' } documents, to add headers or cookies; it gets the URL and an init with the document's cancel signal, and retry() calls it again. A { kind: 'url' } source takes an id of its own. A download the server refuses with 401 or 403 fails as permission-denied, and one that isn't a PDF (a sign-in page, say) as invalid-input. New exports: the HostFetch type and isPdf(bytes).

@embedpdf/core-stage@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – Zoom limits: ZoomLimits is a view's zoom range, resolveZoomLimits(minZoom, maxZoom) makes one inside ZOOM_MIN and ZOOM_MAX (a minZoom above maxZoom counts as maxZoom), and clampZoom(zoom, limits) keeps a zoom inside it. resolveZoom() and zoomAround() take the limits as a last argument; without it they keep the full range.

@embedpdf/core-ui@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – A bar can go at the top of a panel, under its title: the place { panel: id }, beside an edge, { float }, { with } and { at }. A panel's bars stack in the order they were added. barsInPanel(data, panel) lists them and panelOf(place) reads the panel a place names, and validateLayout() names a panel the layout doesn't have, with the closest one that exists.

Patch Changes

  • #923 by @bobsingor – An item without its own importance has its group's, as the docs say, instead of 3. group('annotate', items, { importance: 2 }) now moves those items into the "More" menu before the rest of the bar, and every item of a group at 5 stays in the bar. An item's own importance still wins, and a custom item without a command is still pinned.

@embedpdf/engine-core@3.0.0-next.19

Minor Changes

  • #918 by @bobsingor – The open input for a CloudPDF grant is { kind: 'grant', grant, passphrase?, restart? } (OpenInputGrant), and a document opened with one has doc.grant (DocumentGrant), whose resume() takes passphrase. ShareOpenRequest is GrantOpenRequest, with passphraseProvided, and SharePasswordRequired is GrantPassphraseRequired.

@embedpdf/angular@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The Stage draws the zoom tool's box while you drag, dashed in the accent color (the stage's zoomBox setting, or the --epdf-zoom-box-* variables). With interaction on, it registers the tool's handler for its own view only.

  • #923 by @bobsingor – provideEmbedPdf({ fetch }): your own fetch for documents at a URL, to add headers or cookies.

  • #923 by @bobsingor – EpdfStageRef (and so the <epdf-stage> component) has canZoomIn() and canZoomOut(), whether the zoom is below the Stage's maxZoom or above its minZoom.

@embedpdf/react@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The Stage draws the zoom tool's box while you drag, dashed in the accent color (the stage's zoomBox setting, or the --epdf-zoom-box-* variables). With interaction on, it registers the tool's handler for its own view only.

  • #923 by @bobsingor – <Viewer fetch>: your own fetch for documents at a URL, to add headers or cookies. Each download calls the latest prop.

@embedpdf/svelte@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The Stage draws the zoom tool's box while you drag, dashed in the accent color (the stage's zoomBox setting, or the --epdf-zoom-box-* variables). With interaction on, it registers the tool's handler for its own view only.

  • #923 by @bobsingor – <Viewer fetch>: your own fetch for documents at a URL, to add headers or cookies. Each download calls the latest prop.

@embedpdf/vue@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The Stage draws the zoom tool's box while you drag, dashed in the accent color (the stage's zoomBox setting, or the --epdf-zoom-box-* variables). With interaction on, it registers the tool's handler for its own view only.

  • #923 by @bobsingor – <Viewer :fetch>: your own fetch for documents at a URL, to add headers or cookies. Each download calls the latest prop.

@embedpdf/web@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – Theming for the zoom tool's box: --epdf-zoom-box-fill and --epdf-zoom-box-stroke, which win over the stage's zoomBox setting, plus zoomBoxPaint(colors, accent) and ZOOM_BOX_DASH to draw it.

  • #923 by @bobsingor – Export isFromTextField(event), which tells a key or a copy typed in a text field (an input, a text area, a select or editable content, inside a shadow root too) from one meant for the viewer around it.

@embedpdf/plugin-commands@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The standard commands have tool:zoom, the marquee zoom tool, on Z (Acrobat's key), next to tool:pointer (V) and tool:pan (H).

Patch Changes

  • #923 by @bobsingor – The standard zoom:in and zoom:out commands are off at the Stage's maxZoom and minZoom.

@embedpdf/plugin-i18n@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – Labels for the tool:zoom command (commands.tool.zoom) in all eight languages.

@embedpdf/plugin-interaction@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – A third built-in tool, zoom: drag a box to zoom to it, or click to zoom in a step (Alt-click zooms out), like Acrobat's Marquee Zoom. Its cursor is zoom-in on the pages and between them, one finger draws the box on a touch screen, and it neither follows links nor fills forms. The stage draws the box and does the zooming. listTools() now starts ['pointer', 'pan', 'zoom'].

@embedpdf/plugin-stage@3.0.0-next.19

Minor Changes

  • #920 by @bobsingor – The zoom tool's box. On the host lens, beginZoomDrag, moveZoomDrag, endZoomDrag({ zoomOut }) and cancelZoomDrag run the drag, and getZoomBox() gives the box in viewport pixels for an adapter to draw. A box zooms straight in, about the one point that stays put, until it fills the view, centered; it glides with scrollBehavior. A click (under 4 pixels) zooms one step around the point. createZoomDragHandler(stage, interaction) connects it to the interaction hub. The new zoomBox setting ({ fill, stroke }, null follows the accent) colors the box. zoomIn() and zoomOut() take { around }, like zoomTo and zoomBy. reveal() with a fit now stops at the zoom limit (64×) instead of zooming past it on a tiny rect. Under a tool with a gapCursor (pan, zoom), the pan fallback no longer takes drags between pages. A fit mode, a level or resetSettings() asked for again now applies after a zoom the user made: before, fitAutomatic() after a zoom step, pinch, double-tap or zoomed reveal did nothing when automatic was already the setting, and so did zoomTo() with the last level set.

  • #923 by @bobsingor – The Stage has zoom limits: the minZoom and maxZoom settings, 0.05 and 64 by default (5% to 6400%). Nothing zooms past them: not zoomIn(), a pinch or Ctrl+wheel, zoomTo(), zoomBy(), setCamera(), a reveal or a destination, and not a fit mode, which stops at the limit. When the limits change, a zoom outside them moves to the nearest one; a minZoom above maxZoom counts as maxZoom. canZoomIn() and canZoomOut() say whether the zoom is below maxZoom or above minZoom, for disabling your buttons.

    zoomIn() and zoomOut() step through round levels (100%, 125%, 150%, 200%, 300% and so on) in place of ×1.2. From a level in between, such as a fit, they go to the next one, and a level within 5% of a round one steps past it.

@embedpdf/viewer-angular@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – <epdf-pdf-viewer [fetch]>: your own fetch for documents at a URL, to add headers or cookies. It follows its input, like src.

@embedpdf/viewer-chrome@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – Comment cards show what their thread has and offer what comes next. A mark with nothing said yet shows one box to write the comment, which becomes the annotation's own text where it may change, and a reply where it may not. A thread shows its comment, its replies and a box to reply; the box shows on the selected card, and stays while it holds a draft. A thread's status shows as a chip by its date once one is set. A check on the card marks the thread completed, and the card's menu (its ⋯ button, or a right-click on the card) sets any review status and deletes the thread. A page's count says how many comments are written on it. New commands comment:status-accepted, comment:status-rejected, comment:status-cancelled, comment:status-completed, comment:status-none, comment:delete-thread and the comment-item menu, and the icons circleCheck and send.

  • #918 by @bobsingor – The grant prompt (grantPrompt in every locale) asks for a grant's passphrase or its questions.

  • #920 by @bobsingor – Marquee Zoom in the zoom menu: the tool:zoom command switches to the zoom tool. Drag a box to zoom to it, or click to zoom in (Alt-click: out). It has labels in every built-in language.

  • #923 by @bobsingor – The rows of buttons at the top of the thumbnails, outline and attachments panels are bars of the layout, named after their panel: thumbnails (groups edit, more, history), outline (filter, items) and attachments (count, files). They fit the panel's width like any bar, with what doesn't fit in a "More" menu, so a narrow panel no longer cuts off undo and redo, and add, remove and replace change them. The thumbnails bar also has insert from a file, duplicate and extract where there's room, in place of the page menu's button. The outline's filter and the attachments' count are { custom: 'outline-filter' } and { custom: 'attachments-count' }. Any panel, your own too, draws the bars placed in it with place: { panel: id }.

  • #923 by @bobsingor – FullViewer takes a fetch prop, which every document at a URL downloads with.

  • #923 by @bobsingor – The viewer speaks Swedish (sv) and Traditional Chinese (zh-TW), for fifteen languages. Readers of Traditional Chinese (zh-TW, zh-HK, zh-MO, zh-Hant) now see it instead of English. Both are machine-translated in the terms Adobe Acrobat uses in each language, are waiting for a native speaker's review, and load the first time the viewer shows them. strings an app gives for sv or zh-TW now change the built-in language's words, and the words it leaves out show in that language instead of English.

Patch Changes

  • #923 by @bobsingor – The bar for selected annotations sits below them, and above them when there's no room below. Its menus and the link editor open on the same side.

  • #923 by @bobsingor – The default bars make room in the order their groups say, now that a group's importance is its items' too. In a narrow main bar, pan and pointer are the first buttons to go into the "More" menu, then the View menu and zoom, and the document menu, thumbnails, search and comments never do. So a phone keeps the mode tabs, folded behind a chevron, beside search and comments. In the annotate, shapes and form bars, the text tools, polygons and the less common fields go before undo and redo. The measuring tools, and delete in the annotation bar, stay in their bars. An item you add with layout.add(item, { group }) takes that group's importance unless you give it its own.

  • #923 by @bobsingor – The thumbnails panel has a scrollbar like the pages', and room above the first thumbnail: 20 px around the thumbnails, where the panel's narrow width used to give them the 4 px phone gutter. plugins.thumbnails can still set padding and responsive.

  • #923 by @bobsingor – Full Screen (view:fullscreen) fills the screen with the viewer's own box instead of the whole page, and leaves the page's own full screen alone. The viewer stays where the page put it, and nothing on the page moves or changes. In a frame without allow="fullscreen" the button isn't there, since the browser lets nothing in such a frame go full screen. Where the browser has no full screen for elements (Safari on iPhone) or refuses it, the viewer covers the whole window instead, until the button or Escape ends it; a viewer that already is the whole window there has no Full Screen. The button follows Escape and the page's own requestFullscreen() on the <embedpdf-viewer> element, shows the fullscreenExit icon while the viewer fills the screen, and dialogs and sheets open in the viewer stay on top as it goes full screen.

  • #923 by @bobsingor – The zoom:in and zoom:out commands are off at the zoom limits, and the toolbar's − and + buttons show it: they grey out at maxZoom and minZoom, set under plugins.stage. Zooming in and out steps through round levels (100%, 125%, 150%, 200% and so on).

@embedpdf/viewer@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – The fetch config key: your own fetch for every document at a URL (src, documents and { kind: 'url' } in code), to add headers or cookies. It follows its prop, as element.fetch too: the next download uses a new one, and the viewer stays. A server that answers 401 or 403 shows in the tab as not allowed, and Try again calls fetch again.

@embedpdf/viewer-react@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – <PDFViewer fetch>: your own fetch for documents at a URL, to add headers or cookies. It follows its prop, like src.

@embedpdf/viewer-svelte@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – <PDFViewer fetch>: your own fetch for documents at a URL, to add headers or cookies. It follows its prop, like src.

@embedpdf/viewer-vue@3.0.0-next.19

Minor Changes

  • #923 by @bobsingor – <PDFViewer :fetch>: your own fetch for documents at a URL, to add headers or cookies. It follows its prop, like src.

@embedpdf/plugin-annotation@3.0.0-next.19

Patch Changes

  • #923 by @bobsingor – canDelete() answers for everything a delete takes. Deleting an annotation deletes its replies, review states, grouped parts and popups with it, and canDelete() (on the plugin and on comments) now checks each of them: the annotation as before, and what goes with it by its locked flag and the permission to delete it. A delete button no longer offers a delete the engine refuses (a reply someone else wrote, under a grant that deletes only your own), or deletes a locked reply along with its parent. comments.canDeleteThread() and comments.deleteThread() use the same check, so a thread with a review status can be deleted again: the hidden annotation a status is stored in no longer blocks it.

@embedpdf/core-acrojs@3.0.0-next.19

@embedpdf/core-annotation@3.0.0-next.19

@embedpdf/core-fonts@3.0.0-next.19

@embedpdf/core-form@3.0.0-next.19

@embedpdf/core-geometry@3.0.0-next.19

@embedpdf/core-js-sandbox@3.0.0-next.19

@embedpdf/core-signature@3.0.0-next.19

@embedpdf/engine@3.0.0-next.19

@embedpdf/engine-runtime@3.0.0-next.19

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.19

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.19

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.19

@embedpdf/engine-runtime-linux-x64@3.0.0-next.19

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.19

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.19

@embedpdf/engine-runtime-wasm32@3.0.0-next.19

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.19

@embedpdf/engine-runtime-win32-x64@3.0.0-next.19

@embedpdf/engine-services@3.0.0-next.19

@embedpdf/plugin-actions@3.0.0-next.19

@embedpdf/plugin-attachment@3.0.0-next.19

@embedpdf/plugin-form@3.0.0-next.19

@embedpdf/plugin-history@3.0.0-next.19

@embedpdf/plugin-link@3.0.0-next.19

@embedpdf/plugin-measurement@3.0.0-next.19

@embedpdf/plugin-metadata@3.0.0-next.19

@embedpdf/plugin-outline@3.0.0-next.19

@embedpdf/plugin-page-edit@3.0.0-next.19

@embedpdf/plugin-redaction@3.0.0-next.19

@embedpdf/plugin-render@3.0.0-next.19

@embedpdf/plugin-search@3.0.0-next.19

@embedpdf/plugin-selection@3.0.0-next.19

@embedpdf/plugin-shell@3.0.0-next.19

@embedpdf/plugin-signature@3.0.0-next.19

@embedpdf/plugin-stamp@3.0.0-next.19

@embedpdf/plugin-view-manager@3.0.0-next.19

26 days ago
embed-pdf-viewer

Release Next v3.0.0-next.18

@cloudpdf/contract@3.0.0-next.18

Minor Changes

  • #917 by @bobsingor – Add folders: folders.create, folders.list, folders.get (with the path above the folder), folders.update to rename, folders.moveInto to move documents and folders together, and folders.delete for empty folders. The top level is the place root. Document records carry folderId; documents.init and documents.importFrom take one, and documents.list filters by it. Folder conflicts answer 409 with details.reason.

  • #917 by @bobsingor – Documents have a name: set it with documents.init or documents.import (it defaults to the document id) and change it with the new documents.update operation, which needs the new docs.update tenant scope. documents.list gains q to search names ignoring case, sort (createdAt, name or size) and order, and no longer lists documents that are being deleted unless state=deleting asks for them.

  • #917 by @bobsingor – folders.delete takes recursive=true to delete a folder with everything in it. Without it, a folder that holds anything is still refused.

  • #917 by @bobsingor – Document operations accept tenant JWTs, which need the operation's document capabilities exactly as a document JWT does; no tenant scope reaches inside a document. A tenant token's scope now takes document capabilities next to tenant scopes, and they hold for every document of the tenant. documents.download needs doc.download and documents.thumbnail needs doc.render instead of docs.read. docs.update renames and moves, and never changes content.

Patch Changes

  • #910 by @bobsingor – The doc.versions.* operations take the layer: their paths are /v1/docs/:docId/layers/:layerName/versions…. doc.versions.list answers LayerVersions ({ baseSha, versions }): the layer's base and its versions, the upload first.

  • #909 by @bobsingor – Share links carry identity (who their visitors are, for a link made for one person) on the link record, shares.create and shares.update. Identity is a named component, shared with tokens.issue, so the SDKs have one type for it.

  • #910 by @bobsingor – The signature notes describe the new rule. A signature is made over the layer's own base, and its new version is that layer's own: the document and every other layer stay as they were. StaleBase is no longer an error code.

@cloudpdf/sdk@3.0.0-next.18

Minor Changes

  • #917 by @bobsingor – Add the folders client (create, list, get, update, moveInto, delete), a folderId option on documents.init, documents.importFrom, documents.list and uploads.create, and folderId on document records.

  • #917 by @bobsingor – Add documents.update for renaming documents, a name option on documents.init, documents.importFrom and uploads.create, and the q, sort and order options on documents.list. Document records now carry name.

  • #917 by @bobsingor – Add the recursive option to folders.delete.

  • #910 by @bobsingor – doc.versions.* takes the layer: list, signatures, signatureContents, signatureDigest, analysis, download and revision read /v1/docs/{docId}/layers/{layerName}/versions…. list answers the layer's baseSha and its versions (the upload, then the ones its signatures made), and another layer's version is 404.

  • #909 by @bobsingor – shares.create and shares.update take identity, and a share record returns it: who a link's visitors are, for a link made for one person. Identity is one shared type, used by tokens.issue too.

  • #917 by @bobsingor – A tenant token's scope in tokens.issue takes document capabilities next to tenant scopes, and the document operations document tenant tokens as a credential.

Patch Changes

  • #910 by @bobsingor – StaleBase is no longer an engine error code, and the signature notes describe the new rule: a signature's new version belongs to its layer, and the document and every other layer stay as they were.

@cloudpdf/server@3.0.0-next.18

Minor Changes

  • #917 by @bobsingor – Organize documents in folders. Folders nest up to 100 levels with names unique among siblings, ignoring case. A move takes documents and folders together or not at all and never makes a loop, even when two moves race; only empty folders delete. Documents are filed at upload and listed per folder, and a document being deleted leaves its folder. Migration 046 adds the folders table and documents.folder_id. Errors thrown with structured context now return it as details.

  • #917 by @bobsingor – Store a name for every document, searchable and sortable without regard to case, and rename documents with PATCH /v1/tenants/:tenantId/documents/:id under the new docs.update scope. The documents list searches by name, sorts by creation time, name or size in either order with stable cursors, and hides documents that are being deleted unless asked for by state. Migration 045 names existing documents from metadata.name when it is a non-empty string, otherwise from their id.

  • #917 by @bobsingor – Delete a folder with everything in it via recursive=true: the folder and every folder under it go in one transaction, and every document in them stops opening, leaves every list and stops answering its share links at once, while their stored files are removed in the background. The sweeper now also finishes deletes left behind, such as one interrupted by a crash, after deletingGraceMs (default one minute). The filesystem object store no longer fails a write when a delete elsewhere in the same tenant prunes the directories the write has just made.

  • #917 by @bobsingor – Tenant scopes act on records and document capabilities act on what is inside documents, on any token. A tenant JWT is checked inside documents the way a document JWT is, against the document capabilities its scope names, which hold for every document of the tenant; docs.read lists documents but no longer opens, reads or changes them. Downloading the original file needs doc.download and the thumbnail needs doc.render. A tenant token whose scope names no document capability is refused on the document routes, and tokens.issue validates a tenant token's scope entries.

Patch Changes

  • #910 by @bobsingor – A layer's versions are read through the layer. The version routes moved from /v1/docs/:docId/versions… to /v1/docs/:docId/layers/:layerName/versions…, checked like every other layer route.

    • The list gives the layer's versions (the upload, then the ones its signatures made) and its baseSha.
    • A version's signatures, analysis, download and revisions answer only for the upload or the layer's own versions: another layer's version is 404, and a token for one layer can't use another layer's path.
    • Tenant tokens read any layer's versions, through that layer.
  • #909 by @bobsingor – A share link can say who its visitors are, for a link made for one person: identity on shares.create and shares.update, the same shape as tokens.issue's (migration 043). Every session the link gives carries it, whoever opens the link: a field it sets is never asked, and a visitor's answer for it is ignored. Its userId replaces the visitor's own visitor_<id>; each visit still gets its own layer on a per-visitor link. A link that asks a field its identity sets is refused (400), on create and on an update checked against the link as it will be.

  • #907 by @bobsingor – A share link's visitor is remembered on every link except a per-visitor link that doesn't keep visitors' layers: the exchange answers visitor.keep: true for shared links too. A visitor who comes back in the same browser keeps their answers to the link's questions and stays the author of what they added, instead of being asked again on every page load and listed as a new visitor each time.

  • #910 by @bobsingor – A signature moves only the layer it was made in. Completing a signature writes the new version as that layer's own: only its base_sha moves, and the document (documents.base_sha, the upload) and every other layer stay as they were.

    Before, a signature moved the whole document, so on a per-visitor link the next visitor opened the signer's filled-in, signed copy, and layers still on the old version could no longer sign (StaleBase).

    • Every layer can sign, over its own base. A layer that signs again signs over its previous version.
    • Versions belong to their layer: a layer's versions are numbered along its own chain and stored under the layer, and they're deleted with it.
    • /layers/:layerName/head reports the layer's own base.
    • Migration 044 gives each existing signed version its layer, puts a document a signature moved back on its upload, and starts layers that stored nothing on the upload too.
    • No document-wide signal any more: the base-changed bus channel is gone. Other replicas reload the signing layer because its version moved.

@embedpdf/core@3.0.0-next.18

Minor Changes

  • #907 by @bobsingor – A ready document whose share link asks for a passphrase or answers it got after the document opened shows them as shareRequest, as a document waiting to open does, and documents.retry(id, { sharePassword }) or retry(id, { visitor }) lets it go on as the same visitor instead of opening it again.

Patch Changes

  • #909 by @bobsingor – documents.retry(id, { identity }) takes the visitor's answers to what a share link asks (was { visitor }). They join who the page said the user is, the document's identity or else the viewer's, and the document opens again with that identity.

  • #910 by @bobsingor – The StaleBase engine error is gone, and with it its conflict mapping: a signature moves only its own layer, so every layer can sign.

@embedpdf/engine-core@3.0.0-next.18

Minor Changes

  • #911 by @bobsingor – New runPageFormFieldsConformance suite checks that pages.insert and pages.extract bring form fields, keep same-named fields apart, and survive a save in either mode.

  • #907 by @bobsingor – DocumentShare gets openRequest, onOpenRequest() and resume(): a passphrase, or questions asked on open, that a share link gets while a document is open are asked of the visitor, and resume({ sharePassword }) or resume({ visitor }) lets the document go on as the same visitor. ShareOpenRequest and shareOpenRequestOf() move here from @embedpdf/core, which re-exports the type.

Patch Changes

  • #910 by @bobsingor – The version wire paths and resources are the layer's: wirePaths.layerVersions, layerVersionSignatures, layerVersionSignatureContents, layerVersionSignatureDigest, layerVersionAnalysis, layerVersionDownload and layerVersionRevision take the layer name. The resources are now layer-versions and layer-version-*, so a layer's CDN grant covers only its own versions.

    The catalog schema is LayerVersionsSchema ({ baseSha, versions }, was DocumentVersionsSchema with head).

  • #909 by @bobsingor – identity is the one word for who the user is, on both engines. OpenOptions.identity is who your page knows the user is: the local engine's session identity, as before; on the cloud engine a document token decides, and a share link takes it as the visitor's answers to what the link asks. The share input's visitor is gone (pass identity in the options instead), and DocumentShare.resume() takes { sharePassword, identity }. doc.security.identity says who a session acts for.

    The runtime entry exports devWarn, isDev and resetDevWarnings for engines: development-only warnings, once per key.

  • #910 by @bobsingor – EngineErrorCode.StaleBase is gone. A signature no longer moves the document, so no layer is ever behind it and every layer can sign over its own base.

@embedpdf/engine-runtime@3.0.0-next.18

Minor Changes

  • #911 by @bobsingor – New EPDFDoc_ImportPages copies pages with the form fields of their widgets, where FPDF_ImportPagesByIndex left each copied widget's /Parent naming an object of the source and wrote no /AcroForm. Each field above the copied widgets is copied once, its /Kids limited to what was copied, and the copied top-level fields join the destination's /AcroForm /Fields (made when it has none) with the source's /DR resources, /DA and /Q, /NeedAppearances, calculation order and SignaturesExist. A /DR font is shared only when the destination defines one of that name the same way, key for key (widths and descriptor included, no font program); otherwise it is copied under a free name, and the copied /DA strings follow, comments and all. A copied pop-up's /Parent names the copy of its annotation.

    New EPDFDoc_GetImportFieldRoots lists the top-level fields an import of some pages brings, and EPDFForm_GetFieldPartialName reads a field's own /T by object number.

  • #913 by @bobsingor – New EPDFCatalog_GetMetadata reads the document's XMP packet (the catalog's /Metadata stream) decoded, and EPDFCatalog_SetMetadata replaces it, unfiltered, keeping the stream's object number, or removes it.

    Saving an encrypted document encrypts its metadata stream, unless the file says /EncryptMetadata false; it was written in the clear, so readers decrypted the XMP into noise. A metadata stream with a filter is written decoded, where its encoded bytes were written without the filter that decodes them.

@embedpdf/engine-services@3.0.0-next.18

Minor Changes

  • #911 by @bobsingor – pages.insert and pages.extract bring the form fields of the copied pages' widgets, written into the document's /AcroForm, so the fields stay fillable after a save and in other PDF apps. An extract brings only the widgets on the extracted pages. An inserted top-level field whose name the document already uses comes in as name_2 (or the next free number), with its fields under it, so two copies of a filled-in form keep their own values.

  • #913 by @bobsingor – metadata.update keeps a document's XMP packet in step with its /Info fields: a field it sets is written to its XMP property (dc:title, dc:creator, dc:description, pdf:Keywords, xmp:CreatorTool, pdf:Producer, xmp:CreateDate, xmp:ModifyDate, pdf:Trapped), added when the packet doesn't have it, and a field it sets to null is removed from the packet too. A packet's dc:subject keyword list follows the keywords. metadata.custom.update changes or removes the pdfx: property Adobe apps copy a custom key to, and never adds one. Everything else in the packet stays as written; a document without XMP gets none, and XMP that isn't well-formed is left as it is.

@cloudpdf/engine@3.0.0-next.18

Patch Changes

  • #910 by @bobsingor – A document's signed bytes (signatures.getContents, getDigest, downloadRevision and history analyze) are read through its layer's version paths.

  • #909 by @bobsingor – A share link takes the page's identity (the open() option, or the viewer's identity) as the visitor's answers, the same as the visitor typing them: only the fields the link asks, never userId or groupId. The share input's visitor is gone.

    Nothing the page passes is ignored silently: in development the engine warns once when it doesn't use scope (the document's token says what the session may do), or when the session doesn't act for the identity passed, and says why.

  • #907 by @bobsingor – A renewal the share link refuses for a passphrase, or for questions asked on open, no longer retries on every request. The document asks once (doc.share.openRequest, onOpenRequest), reads on with its session until it runs out, then waits for resume(); with nothing listening, a request fails with the refusal. A shared link's visitor is now kept in the visitor store for the next visit, as the server says (visitor.keep).

@cloudpdf/viewer@3.0.0-next.18

Patch Changes

  • #909 by @bobsingor – The viewer takes identity again: who your page knows the user is. A document token decides for itself, and a share link takes it as the visitor's answers to what the link asks, so the questions it covers aren't asked. src.visitor is gone; scope stays out, since the token says what the user may do.

@embedpdf/core-js-sandbox@3.0.0-next.18

Patch Changes

  • #905 by @bobsingor – PDF JavaScript runs in Next.js apps again.

    • Turbopack, the default bundler in Next 16, failed with "Can't resolve '#quickjs-variant'", because it doesn't follow an imports target that names another package. #quickjs-variant now maps to two files of this package, quickjs-variant/browser.js and quickjs-variant/wasmfile.js, which re-export QuickJS's browser and wasm-file builds.
    • Production builds on Next before 16.4.1, webpack or Turbopack, broke QuickJS's browser build, so the sandbox never started. QuickJS 0.32.0 embeds its wasm as raw bytes in a template literal, and Next's minifier turned some of them into octal escapes ("Octal escape sequences are not allowed in template strings"). QuickJS is pinned to 0.31.0, which embeds the wasm as base64.

    Browsers still get the browser build, with no .wasm request, and Node the wasm-file one.

@embedpdf/viewer-chrome@3.0.0-next.18

Patch Changes

  • #908 by @bobsingor – Hide the Measure tab when the session can neither draw measurements nor set a page's scale: the measurement panel, and the Measure bar's scale button that opens it, now follow the same permission checks as the measurement tools. The scale button is drawn like every other bar button, so the Measure bar is as tall as the other mode bars, and it shows pressed while the panel is open; clicking it again closes the panel.

  • #907 by @bobsingor – Where a document allows searching but not copying text, search opens as a find bar over the top corner of the pages instead of a panel of empty result rows. It shows which match you're on and how many there are, Enter and Shift+Enter step through them, and its options sit behind a button. In the search panel, Enter and Shift+Enter step through the matches too, and a match the engine finds no text around reads "Result 3" instead of an empty row.

  • #907 by @bobsingor – When a share link gets a passphrase or questions while its document is open, the viewer shows the same passphrase or questions form over the document, and the document goes on once they're given.

@cloudpdf/viewer-angular@3.0.0-next.18

@cloudpdf/viewer-react@3.0.0-next.18

@cloudpdf/viewer-svelte@3.0.0-next.18

@cloudpdf/viewer-vue@3.0.0-next.18

@embedpdf/core-acrojs@3.0.0-next.18

@embedpdf/core-annotation@3.0.0-next.18

@embedpdf/core-fonts@3.0.0-next.18

@embedpdf/core-form@3.0.0-next.18

@embedpdf/core-geometry@3.0.0-next.18

@embedpdf/core-signature@3.0.0-next.18

@embedpdf/core-stage@3.0.0-next.18

@embedpdf/core-ui@3.0.0-next.18

@embedpdf/engine@3.0.0-next.18

@embedpdf/engine-runtime-darwin-arm64@3.0.0-next.18

@embedpdf/engine-runtime-darwin-x64@3.0.0-next.18

@embedpdf/engine-runtime-linux-arm64@3.0.0-next.18

@embedpdf/engine-runtime-linux-x64@3.0.0-next.18

@embedpdf/engine-runtime-linuxmusl-arm64@3.0.0-next.18

@embedpdf/engine-runtime-linuxmusl-x64@3.0.0-next.18

@embedpdf/engine-runtime-wasm32@3.0.0-next.18

@embedpdf/engine-runtime-win32-arm64@3.0.0-next.18

@embedpdf/engine-runtime-win32-x64@3.0.0-next.18

@embedpdf/angular@3.0.0-next.18

@embedpdf/react@3.0.0-next.18

@embedpdf/svelte@3.0.0-next.18

@embedpdf/vue@3.0.0-next.18

@embedpdf/web@3.0.0-next.18

@embedpdf/plugin-actions@3.0.0-next.18

@embedpdf/plugin-annotation@3.0.0-next.18

@embedpdf/plugin-attachment@3.0.0-next.18

@embedpdf/plugin-commands@3.0.0-next.18

@embedpdf/plugin-form@3.0.0-next.18

@embedpdf/plugin-history@3.0.0-next.18

@embedpdf/plugin-i18n@3.0.0-next.18

@embedpdf/plugin-interaction@3.0.0-next.18

@embedpdf/plugin-link@3.0.0-next.18

@embedpdf/plugin-measurement@3.0.0-next.18

@embedpdf/plugin-metadata@3.0.0-next.18

@embedpdf/plugin-outline@3.0.0-next.18

@embedpdf/plugin-page-edit@3.0.0-next.18

@embedpdf/plugin-redaction@3.0.0-next.18

@embedpdf/plugin-render@3.0.0-next.18

@embedpdf/plugin-search@3.0.0-next.18

@embedpdf/plugin-selection@3.0.0-next.18

@embedpdf/plugin-shell@3.0.0-next.18

@embedpdf/plugin-signature@3.0.0-next.18

@embedpdf/plugin-stage@3.0.0-next.18

@embedpdf/plugin-stamp@3.0.0-next.18

@embedpdf/plugin-view-manager@3.0.0-next.18

@embedpdf/viewer-angular@3.0.0-next.18

@embedpdf/viewer@3.0.0-next.18

@embedpdf/viewer-react@3.0.0-next.18

@embedpdf/viewer-svelte@3.0.0-next.18

@embedpdf/viewer-vue@3.0.0-next.18