Release v3.3.0
-
#1093 by @bobsingor –
doc.versions.analysistakesenginein place ofpolicy.engineis theanalysisvalue 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 ignorespolicy, and no longer refuses a request for it.doc.versions.signaturestakesengineas well, thesignaturesvalue of the layer's head, with the same rule for caching. -
#1088 by @bobsingor – Two operations,
doc.signatures.validationInfoanddoc.signatures.addValidationInfo, read and store the validation data a file holds for checking its signatures with no network.doc.signatures.preparetakes a document timestamp with nofield, and its answer may carry thefieldthe engine made. All of it arrived in 3.3.
- #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, publishessignatures.validationInfoAdded, and everyone else with the layer open receives the same event. SoaddValidationInfo()from@embedpdf/core-signatureruns 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 })andprepare({ 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, withdetails.needsanddetails.serverVersion. Checking signatures against an older server still works.
- #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'sanalysisengine 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.
-
#1093 by @bobsingor –
doc.versions.analysis()takesenginein place ofpolicy.engineis theanalysisvalue 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 ignorespolicy, and no longer refuses a request for it.doc.versions.signatures()takesengineas well, thesignaturesvalue of the layer's head, with the same rule for caching. -
#1088 by @bobsingor –
doc.signatures.validationInfo()anddoc.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 carryfield, the field the engine made for a document timestamp prepared with none.
-
#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
analysisengine 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 answeredInvalidArgfor 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 carriespolicy, 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/:sha256takesengine, theanalysisvalue from/head. With this server's value a settled answer isimmutable. With another value, or with none, the answer is this server's own, withno-storeand the current value inEmbedPDF-Engine. Apolicyparameter 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/:sha256takesenginetoo, thesignaturesvalue from/head, with the same rule:immutablewith this server's value,no-storewith another or with none. It wasimmutablewhatever 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
analysisengine 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-infoanswers the certificates, OCSP responses and CRLs the layer's file holds, each as base64. Its@tokenform is pinned atdocVersionand cached like the signature list. It needsdoc.forms.read.POSTto 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 needsdoc.signfor the document, and a certification that allows no changes forbids it. The document version moves, and the audit row, of the new kindsignature.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/preparetakes a document timestamp with nofield. The worker makes the field, the answer names it infield, and it needsdoc.signfor the document.- Changing the metadata of a layer is now refused after a certification that allows no changes, before the write reaches a worker.
- #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 withdeferInkCommit). A host that runsupdateitself uses it to make the strokes an annotation withfinishInkDraftfirst, and then run the message again.
- #1091 by @bobsingor –
CommandDefinition,CommandFamily,CommandContextandIconAccentare core types now, so a plugin can ship commands without depending on the commands plugin, which still exports them.@embedpdf/core/commandshascreateDocumentCommands(): download and print, which take the browser's file download as an argument.@embedpdf/core/testinggainscreateTestCommandContext(), a command context over stand-in capabilities for testing a plugin's commands.
-
#1088 by @bobsingor – Long-term validation:
addValidationInfo()keeps a signature checkable for years, andvalidateSignatures()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), thenrevocation, 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 whatvalidateSignatures()says about the result. - All or nothing: when a signature would not read as complete, nothing is stored. It throws
Network, with the address indetails.source, when an address didn't answer, and otherwiseSignatureRefusedwithdetails.reason('no-timestamp','untrusted','no-answer'or'revoked'),details.certificateanddetails.field.partial: truestores what there is instead. fieldscovers some signatures only, andmaxCrlBytes(1 MiB) is the largest list it stores.- Calling it again asks for nothing the file holds and adds nothing.
httpRevocationSource({ url })is aRevocationSourcefor a web page, which can't ask a certificate authority itself: each question goes to a route of your own. It takesurl,headers,fetch,timeoutMsandretries, ashttpTimestampAuthority()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()answershttpRevocationSource(). The addresses it is sent come from certificates, so it decides where it may go: only publichttpandhttpsaddresses, 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, withheadersa 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 leavesrevocationat'unknown'.longTermstays about what the file holds.sign(doc, { kind: 'timestamp', key })needs nofield. The engine makes a field for the document timestamp, so the last step of keeping a file checkable is one call.result.signature.fieldNamesays 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.
validationTimenames a timestamp's timestampedAt.{ 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'svalidationTimecarries the time under both names, with the same value (AppliedValidationTime), and the option takes either. Given both,stampedAtis the one used.- On a value you type as
ValidationTimeyourself,genTimeis optional now. A verdict'svalidationTimealways has it.
revocationon every verdict.'good','revoked'or'unknown': whether a certificate between the signer and your anchor was withdrawn byvalidationTime.revocationReasonnames 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'sadbe-revocationInfoArchivalattribute. 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. summaryis'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 changessummary. 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'.
longTermon every verdict.{ enabled, provenAt, expiresAt, documentTimestampedAt, missing }, always judged at the time a timestamp proves, whatevervalidationTimeis.enabledis 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.provenAtis that time,expiresAtthe day the certificate of the last covering timestamp expires, anddocumentTimestampedAtthe 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 inAt.missingsays 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 haswithoutIssuer: 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 toauthority.certificateand names where to ask about it.authority.revocationanswers 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.
RevocationSourceis where revocation answers come from: one method,fetch(request), that returns the bytes answering aRevocationRequest(an OCSP request for a responder, or an address to fetch a CRL or an issuer's certificate from).RevocationReasonnames 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 authoritytimestampTrustdoesn't cover, as it does for a signature's own timestamp, and leaves nothing signed. Before,timestampTrustwith a document timestamp failed withInvalidArg.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:revocationreads'good'when the certificates above it do,longTermcounts nothing as missing for it, andaddValidationInfo()asks nobody about it. The extension counts on a certificate that issues nothing, andnoRevAvaildoesn't count beside an address to ask at.createTestCertificateAuthority()'sissueSigner({ unrevocable })issues one, with'validity-assured'or'no-rev-avail'(Unrevocable). - 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
-
#1092 by @bobsingor –
pkijs4 andasn1js4. Both are ES modules only and no longer usepvtsutils, the one CommonJS module this package brought along. An Angular production build no longer warns thatpvtsutilsis not ESM, and anallowedCommonJsDependenciesentry 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
modulesetting. dist/THIRD-PARTY-NOTICES.txtlists what the files hold, with each version and license, andinlinedDependenciesinpackage.jsonhas 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()takestimestampAuthority: 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.timestampTrustrefuses a token from an authority that trust port doesn't cover. With atimestampAuthority,sign()reserves 16384 bytes for the signature unlesscontentsSizeBytessays 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 indetails.authority.Two steps.
completeSignature(doc, { prepared, cms })is the second half ofsign(): 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 inverdict.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'ssummary. A document timestamp reads back with a real verdict, where it readindeterminate.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.
TrustPorttakes an optionaltimestampAnchors(): the certificates trusted for timestamp authorities, apart fromanchors(), the ones trusted for signers. Signer trust is judged on the certificate that signed:validateChain(), andvalidateSignatures()through it, validated whichever certificate the CMS carried last, so a signature whose own certificate led nowhere could readtrustedwhen 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-certificateattribute, andsigning-certificate-v2with 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 isinvalidwhere a SHA-1 binding was ignored; a binding with an unknown hash readsunsupported. 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 thecontentsSizeBytesto prepare with.Also. A CMS key may declare a
hash, whichsign()takes as its default digest.ecdsaRawFromDer()turns the DER ECDSA signature most signing services return into ther || sa raw key returns.createTestTimestampAuthority()signs with a certificate made for a timestamp authority, so validators such as OpenSSL accept its tokens.
-
#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()andcreateTestTimestampAuthority()made them that way.A certificate that a personal key store already holds keeps the serial number it has.
store.remove(subject)has the nextpersonalSigner()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.
- The default,
-
#1093 by @bobsingor – An analysis URL names the server's
analysisengine value, and no policy number.encodeAnalysisToken()no longer writespolicy, anddecodeAnalysisToken()reads past one.AnalysisToken.policyVersionis deprecated and ignored; it goes in 4.0.analysisQueryString()no longer writespolicy. It takesengine, the server'sanalysisvalue, and writes it as a query parameter.VersionAnalysisQuerySchemahasenginein place ofpolicy.wirePaths.layerVersionSignatures()takesengine, the server'ssignaturesvalue, and writes it as a query parameter.VersionSignaturesQuerySchemais its query.
SIGNATURE_POLICY_VERSIONandpolicyVersionon 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()anddoc.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 needsdoc.forms.read.addValidationInfo(input)stores entries and returns{ added, meta }, whereaddedcounts 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 withInvalidArg,details.fieldnames 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.undoableisfalse), and undoing another change leaves it in place. - It needs
doc.sign. After a certification that allows no changes it fails withProtectedDocument. - It fires
signatures.validationInfoAdded, withadded, when it stored something.
- Each entry must be one DER object of at most 16 MiB (
- New exports: the types
ValidationInfo,ValidationInfoAddResult,ValidationInfoCountsandValidationInfoKind,VALIDATION_INFO_KINDS,VALIDATION_INFO_LIMITS, andvalidationInfoEntryProblem(), which says why bytes are not an entry the engine stores.
A document timestamp needs no field.
doc.signatures.prepare({ kind: 'timestamp' })may leavefieldout: 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.fieldis optional for that reason, andSignaturePrepared.fieldnames the field the engine made. A signature with nofieldfails withInvalidArg. It needsdoc.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()andvalidateSignatures()read every object written after it asforbidden, with the ruleno-changes-certification. Validation data and a document information dictionary readpermittedbefore.- The engine refuses signing, a document timestamp included, and metadata changes on such a document, with
ProtectedDocument.doc.security.allows('doc.sign')isfalsethere.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
/Annotsas an object of its own. A document timestamp, a signature in a new field or a comment added after a signature readforbiddenfor the earlier signature in three cases, and now readpermitted, 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, andStepInput.unwrittencarries them (UnwrittenObject). Without them such a page readsforbidden, with a reason that says the earlier list could not be read.SIGNATURE_POLICY_VERSIONis 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/wirehas the schemas for validation data as base64 (ValidationInfoWireSchema,ValidationInfoAddBodySchema,ValidationInfoAddResultSchema, withencodeValidationInfo()anddecodeValidationInfo()), a cached read kindvalidationInfowith its paths and resource, andVALIDATION_INFO_SINCE, the version these arrived in. A prepare's body may leavefieldout, and its answer may carry thefieldthe engine made. The worker's answer to a prepare says the object number of the field the signing goes in.
- #1080 by @bobsingor – An app that imports
@embedpdf/enginebuilds with Parcel again. The check behind the development warnings readprocess?.env?.NODE_ENV, which Parcel does not replace: it took it for a use of Node'sprocessand stopped the build withNode builtin polyfill "process/" is not installed. The check now readsprocess.env.NODE_ENVas written, the expression every bundler replaces.
-
#1088 by @bobsingor – Add
doc.signatures.getValidationInfo()anddoc.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 withProtectedDocumentafter a certification that allows no changes. - It fires
signatures.validationInfoAddedwhen it stored something.
A document timestamp needs no field:
doc.signatures.prepare({ kind: 'timestamp' })with nofieldmakes one for it, with no size, so it shows nowhere on the page. The field is added in the same revision as the timestamp, andprepared.fieldnames it.A signature field or document timestamp that Acrobat adds to a page whose annotation list is an object of its own now reads
permittedfor the earlier signatures, as Acrobat reads it.
- #1079 by @bobsingor –
localEngine()starts under a dev server that prebundles packages without their files: Vite 7 and older, which includesng servein 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 fromblob: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.
-
#1088 by @bobsingor – Read and store a document's validation data, and read a page's earlier annotation list from the file.
ValidationInfoReaderreads the certificates, OCSP responses and CRLs of the document security store (/DSS), andValidationInfoMutatorstores 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.validationInfoandsignatures.addValidationInfo. The second is a write: it runs in one transaction and has no undo. SignatureAnalyzerreads 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 readspermittedfor the earlier signature.SignatureMutator.prepare()takes a document timestamp with nofield: 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_AddandEPDFDoc_GetLoadedObjectValue.
-
#1091 by @bobsingor – Each feature entry exports its plugin's commands as a list:
stageCommandsfrom/stage,interactionCommandsfrom/interaction,selectionCommandsfrom/selection,annotationCommandsfrom/annotation,historyCommandsfrom/history,renderCommandsfrom/renderanddocumentCommandsfrom/runtime.standardCommandsis these lists joined. To leave some commands out, spread the lists you want in place ofstandardCommands./interactionalso exportstoolCommand(id), the command behindtool:<id>, to give a tool of your own a shortcut.standardCommandsgainshistory:undo(Mod+Z) andhistory:redo(Mod+Shift+Z,Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled withoutwithHistory()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...standardCommandsin thecommandssetting ofwithCommands(). With the standard commands in use,registerCommand()with one of these ids now needs{ replace: true }. -
#1088 by @bobsingor –
EpdfSignaturehasaddValidationInfo()andcanAddValidationInfo(), as the signature plugin does.
- #1092 by @bobsingor – A production build no longer warns that
pvtsutilsis not ESM. The signature package moved topkijs4 andasn1js4, which no longer use it. AnallowedCommonJsDependenciesentry forpvtsutilscan go.
-
#1091 by @bobsingor – Each feature entry exports its plugin's commands as a list:
stageCommandsfrom/stage,interactionCommandsfrom/interaction,selectionCommandsfrom/selection,annotationCommandsfrom/annotation,historyCommandsfrom/history,renderCommandsfrom/renderanddocumentCommandsfrom/runtime.standardCommandsis these lists joined. To leave some commands out, spread the lists you want in place ofstandardCommands./interactionalso exportstoolCommand(id), the command behindtool:<id>, to give a tool of your own a shortcut.standardCommandsgainshistory:undo(Mod+Z) andhistory:redo(Mod+Shift+Z,Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled withouthistoryPlugin()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...standardCommandsin thecommandssetting ofcommandsPlugin(). With the standard commands in use,registerCommand()with one of these ids now needs{ replace: true }.
-
#1091 by @bobsingor – Each feature entry exports its plugin's commands as a list:
stageCommandsfrom/stage,interactionCommandsfrom/interaction,selectionCommandsfrom/selection,annotationCommandsfrom/annotation,historyCommandsfrom/history,renderCommandsfrom/renderanddocumentCommandsfrom/runtime.standardCommandsis these lists joined. To leave some commands out, spread the lists you want in place ofstandardCommands./interactionalso exportstoolCommand(id), the command behindtool:<id>, to give a tool of your own a shortcut.standardCommandsgainshistory:undo(Mod+Z) andhistory:redo(Mod+Shift+Z,Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled withouthistoryPlugin()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...standardCommandsin thecommandssetting ofcommandsPlugin(). With the standard commands in use,registerCommand()with one of these ids now needs{ replace: true }.
-
#1091 by @bobsingor – Each feature entry exports its plugin's commands as a list:
stageCommandsfrom/stage,interactionCommandsfrom/interaction,selectionCommandsfrom/selection,annotationCommandsfrom/annotation,historyCommandsfrom/history,renderCommandsfrom/renderanddocumentCommandsfrom/runtime.standardCommandsis these lists joined. To leave some commands out, spread the lists you want in place ofstandardCommands./interactionalso exportstoolCommand(id), the command behindtool:<id>, to give a tool of your own a shortcut.standardCommandsgainshistory:undo(Mod+Z) andhistory:redo(Mod+Shift+Z,Mod+Y), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled withouthistoryPlugin()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...standardCommandsin thecommandssetting ofcommandsPlugin(). With the standard commands in use,registerCommand()with one of these ids now needs{ replace: true }.
-
#1091 by @bobsingor – The annotation plugin ships its own command:
createAnnotationCommands()makes the list withannotation:delete. It comes from a new@embedpdf/plugin-annotation/commandsentry. It is the command@embedpdf/plugin-commands/standardheld, 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 asannotationCommands.The tools the plugin registers say whether the user may use them (
canUse()on the interaction plugin'sTool): only a user who may create annotations. Sotool:<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.
- #1091 by @bobsingor –
createStandardCommands()in@embedpdf/plugin-commands/standardis 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'sstandardCommands, or the lists you need. The command types (CommandDefinition,CommandFamily,CommandContext,IconAccent) are re-exported from@embedpdf/core, where they live now.
- #1091 by @bobsingor – The history plugin ships undo and redo as commands:
createHistoryCommands()makes the list ofhistory:undo(Mod+Z) andhistory:redo(Mod+Shift+Z,Mod+Y). It comes from a new@embedpdf/plugin-history/commandsentry. 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 ashistoryCommands, and it is part ofstandardCommands.
- #1089 by @bobsingor – EmbedPDF's own strings gain
commands.history.undoandcommands.history.redo, the labels of the standard undo and redo commands, in all eight languages.
-
#1091 by @bobsingor – The interaction plugin ships the tool commands:
createInteractionCommands()makes the list oftool:pointer,tool:pan,tool:zoomandtool:<id>for every other tool, andtoolCommand(id)is the command behindtool:<id>, to build a tool's own command on. They come from a new@embedpdf/plugin-interaction/commandsentry. They are the commands@embedpdf/plugin-commands/standardheld, 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 asinteractionCommands.A tool can say whether the user may use it:
Toolgains an optionalcanUse(), and the plugincanUseTool(id), which istruefor a tool without one andfalsefor an id that isn't registered. The tool commands show disabled while it says no. Switching to a tool doesn't ask.
- #1091 by @bobsingor – The render plugin ships the snapshot's commands:
createRenderCommands()makes the list oftool:snapshot,snapshot:copy,snapshot:saveandsnapshot:clear, and takes the browser's clipboard write and file download as an argument. It comes from a new@embedpdf/plugin-render/commandsentry. They are the commands@embedpdf/plugin-commands/standardheld, 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 asrenderCommands.
- #1091 by @bobsingor – The selection plugin ships its own command:
createSelectionCommands()makes the list withselection:copy, and takes the browser's clipboard write as an argument. It comes from a new@embedpdf/plugin-selection/commandsentry. It is the command@embedpdf/plugin-commands/standardheld, 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 asselectionCommands.
-
#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()andvalidateField()carriesrevocation('good','revoked'or'unknown', withrevocationReason) andlongTerm({ enabled, provenAt, expiresAt, documentTimestampedAt, missing }), read from the answers the file holds. A signer you trust whose certificate is proven withdrawn reads'invalid'. validate()andvalidateField()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'. PassvalidationTime: { kind: 'now' }to judge every certificate as of now.- A verdict's
validationTimenames a timestamp's timestampedAt.genTime, its name until now, is there beside it and is still taken byvalidate(), 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.
revocationis where revocation answers come from, such ashttpRevocationSource({ 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 needstrust.documentTimestamp: truethen adds a document timestamp fromtimestampAuthority.- The signature is sealed first, so a failure afterwards can't undo it.
sign(),completeSignature()andplaceMark()still resolve, and the result says what happened:validationInfois{ added, documentTimestamp }, ornullwhen nothing was to be added, andvalidationInfoErroris the error that kept the data or the document timestamp out, ornull. - 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: therevocationandtrustsettings, anddoc.sign.- The verdicts are read again when anyone adds validation data to the document. Checking asks nobody: only what the file holds counts.
httpRevocationSourceandcreateTestCertificateAuthoritycome with the plugin's exports, beside the signers.
- Every verdict from
-
#1087 by @bobsingor – The
timestampAuthoritysetting: 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()andprepareSignature()take a per-calltimestampAuthority;nullseals that one without a timestamp. With thetrustsetting 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()takesvalidationTime: { kind: 'earliest-timestamp' }, and a verdict carries its signature's timestamp intimestamp.httpTimestampAuthorityandcreateTestTimestampAuthoritycome with the plugin's exports, beside the signers.
- #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.
- #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/commandsentry. They are the commands@embedpdf/plugin-commands/standardheld, 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 asstageCommands.
- #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.
-
#1039 by @bobsingor –
plugins.stamp.librariesgives 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 inquickas<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, sostandard:<name>inquickfinds 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
revocationandtrustsettings 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.
httpRevocationSourceandcreateTestCertificateAuthorityare 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.
httpTimestampAuthorityandcreateTestTimestampAuthorityare exported beside the signers.
-
#1039 by @bobsingor –
plugins.stamp.librariesgives 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 inquickas<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. TheStampLibraryFiletype 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, andstandard:<name>inquickfinds its stamps. Copies already stored stay in the panel, where each can be removed. Fixes #1084. -
#1088 by @bobsingor –
plugins.signature.revocationkeeps every signature the viewer seals checkable with no network: its validation data is stored in the file right after the seal.plugins.signature.documentTimestampadds a document timestamp after it.httpRevocationSourceandcreateTestCertificateAuthorityare exported beside the signers. -
#1087 by @bobsingor –
plugins.signature.timestampAuthoritygives every signature the viewer seals a timestamp.httpTimestampAuthorityandcreateTestTimestampAuthorityare exported beside the signers, so the authority comes from the same import as the key.
- #1092 by @bobsingor – An Angular production build of an app with the viewer no longer warns that
pvtsutilsis not ESM. The signature package moved topkijs4 andasn1js4, which no longer use it. AnallowedCommonJsDependenciesentry forpvtsutilscan go.
- #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()answersfalsefor 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.
Release v3.2.0
-
#1071 by @bobsingor – The contract has the change op
annotations.copy(refs,page,offset,objectNumbers) and its result item (annotations,refMap,dropped,meta).openapi.jsondescribes 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.jsondescribes both.
-
#1071 by @bobsingor – The cloud engine has
doc.annotations.copy(refs, { page?, offset?, objectNumbers? }), anddoc.applytakes the opannotations.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 withNotImplementedbefore 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; itsdetailsname 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 asstream.desyncedwithreason: '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? }), anddoc.applytakes the opforms.copy. The copies are made on the server in one request. Against a server older than 3.2 the change is refused withNotImplementedbefore anything is sent.
-
#1071 by @bobsingor – The SDK has the change op
annotations.copyand its result item:ChangeOp.AnnotationsCopyandChangeItem.AnnotationsCopy. -
#1075 by @bobsingor – The SDK has the change op
forms.copyand its result item:ChangeOp.FormsCopyandChangeItem.FormsCopy.
-
#1071 by @bobsingor –
POST …/changestakes the new opannotations.copy: copies of annotations in the same document, with a stamp's drawing and an attachment's file copied on the server. It needsdoc.annotate.readand the right to create each kind, notdoc.download. A ref the document doesn't have refuses the change withNotFound. On the event stream, a client that says a version before 3.2 getsfull-refreshin place of a change with this op. A copy stays within the server'sbundleLimits: past one, its change is refused withPayloadTooLarge, anddetails.limitnames 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-Versiongoes out asfull-refreshin the row's place, and the stream carries on with the rows after it; afull-refreshnow says why in its data (reason). An op ofPOST …/changeswith a field the server doesn't know refuses the request withInvalidArg, 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 …/changestakes the new opforms.copy: a new field from each field named, with its widgets, made on the server. It needsdoc.forms.modify, anddoc.forms.scriptto keep scripts, submits and links. A field the form doesn't have refuses the change withNotFound. On the event stream, a client that says a version before 3.2 getsfull-refreshin place of a change with this op. A copy stays within the server'sbundleLimits: more fields thanitemsrefuses its change withPayloadTooLarge.
- #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 itseditablerule.
- #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 callssend(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.opIdnames the change when the caller of the verb chose an id, andhistory: falsekeeps it out of the history. The newHistoryOptionstype is thehistory?: falseoption a verb takes from its caller.
- #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.
-
#1071 by @bobsingor – New change op
annotations.copy, anddoc.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,lockedincluded, and a stamp's drawing or an attachment's file, sodoc.downloadisn't needed. It gets its own ref and a freshnm, 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,refMapanddropped, 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.runAnnotationCopyConformancechecks an engine against it. A copy stays within the bundle limits (items,resources,resourceBytesandbundleBytes); past one it is refused withPayloadTooLarge, anddetails.limitnames 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_SINCElists the kinds that arrived after 3.0 (pages.setScalein 3.1),changeKindsUnknownTo(version, kinds)names the kinds a side of that version lacks, andlacksWhatArrivedIn(version, since)makes the comparison for anything else that arrived in a version.stream.desyncedhas a secondreason,'unknown-change': a change of a kind this version doesn't know arrived. Each op of aPOST …/changesrequest 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, anddoc.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 byoffsetor put onpage. It is named after its source with the next free number (emailbecomesemail_2,billing.namebecomesbilling.name_2), and it has its source's value unlessvaluesisfalse; a signature never comes along.widgetsnames the widgets to copy when it isn't all of them. The result holds the new fields, their widgets,refMapanddropped, with the reasons a form import uses, and its events are oneforms.createdper field.planFormCopiesis the rule itself, without zod, for a viewer that shows the copies before the engine answers;copyNameOfandfieldNameTakenname 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.runFormCopyConformancechecks an engine against it. A form import and a copy now also carry a widget's check style and its dash pattern.fieldsnames at most as many fields as the bundle limits'items; more is refused withPayloadTooLarge, anddetails.limitnames the limit. -
#1049 by @bobsingor – An annotation update can change
nm. A new name renames the annotation in place, andnm: nullremoves 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, andrunChangeConformance'sopenoption takes the PDF to open, such asNAMES_FIXTURE_PDF, a file with missing and shared names.
-
#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 opannotations.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 opforms.copy.
-
#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 needsdoc.annotate.readand 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 withPayloadTooLargebefore anything is written.document.applyChangestakes the deployment'slimits; 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 needsdoc.forms.modify; a script, a submit or a link is left out and reported withoutdoc.forms.script. A copy names at most as many fields as the bundle limits'items; more is refused withPayloadTooLargebefore the form is read. -
#1049 by @bobsingor –
annotations.updateandforms.updateWidgetwrite a newnmto the annotation's own/NM, or remove it fornull. The object, its replies, its appearance and its other keys stay as they are. A name another annotation on the page has is refused withInvalidArg. An empty name removes/NM, as a create given one writes none.
-
#1071 by @bobsingor –
EpdfAnnotationhasduplicate(refs, options),canDuplicate(refs),isMovable(ref),selection.duplicate(options)andselection.canDuplicate(). -
#1075 by @bobsingor –
EpdfFormhasduplicate(fields, options)andduplicateWidgets(widgets, options).
- #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 withupdateWidget(), 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.
- #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 needscancelable: trueon them.
-
#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, labelledannotation.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)andselection.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 withinvalid-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, andgetAuthority()also sayscopy. -
#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, passeshistory: falseto keep the import out of undo and redo:annotation.import(bundle, { history: false }).
-
#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 unlessvaluesis true. NewduplicateWidgets(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 freeChoice<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'sselection.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 withinvalid-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 passeshistory: falseto keep the import out of undo and redo:form.import(bundle, { history: false }).
- #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
scrollChainingsetting is on by default. Set it tofalsein 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.
-
#1071 by @bobsingor – New command
annotation:duplicate, withCtrl/Cmd+Dand 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 iconduplicateand labelcommands.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 labelformDesign.duplicateGroup, in all 15 languages.
- #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:30in a British browser andSep 14, 5:30 PMin an American one, and alocalethat 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.
- #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.
- #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.
- #1074 by @bobsingor –
<FormLayer>draws a field's picture where the field is now. A field that was moved, in Form design or withupdateWidget(), 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.
-
#1074 by @bobsingor –
<FormLayer>draws a field's picture where the field is now. A field that was moved, in Form design or withupdateWidget(), 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 throwsCannot 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 readsusePage()in a cleanup gets the page as it last was.
- #1074 by @bobsingor –
<FormLayer>draws a field's picture where the field is now. A field that was moved, in Form design or withupdateWidget(), 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.
Release v3.1.0
- #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'sviewports, anddoc.pages.setScaleanswers with the new layout. The changes endpoint takes thepages.setScaleop. The page list and the measurement viewport are named components.
-
#1030 by @bobsingor – The layout is read at the manifest's
viewportsVersionas well as itslayoutVersion, so it carries the pages' scales and a scale change reaches every client.page.measure.setScale()is a one-pagedoc.pages.setScalechange. -
#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.
- #1030 by @bobsingor – The types carry
viewportsVersionon the manifest and a write's cache delta,viewportson a page's layout, thepages.setScalechange op and its answer, and the newlayoutindoc.pages.setScale's answer.
- #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/scaleis a one-op change, so its opId undoes it. The changes endpoint appliespages.setScale.
- #1033 by @bobsingor –
src: { id, token }keeps the document open whensrcchanges but itsiddoesn't, and takes the next token from the newsrc. A token function written inline in a component, made again on every render, no longer reopens the document.
-
#1029 by @bobsingor –
ctx.storeChangeCount()says how many times the store changed: a state or mirror write anywhere, or actx.notify(), counted when the change happens, also while the change stream is held. Give it tomemoormemoByKeyas 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/testinghave it too.memoandmemoByKeycompare their inputs with a plain loop, which makes every cached read a little cheaper.
-
#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.
- #1029 by @bobsingor –
omittedCommandsOf(data, resolve, menuTarget)takes which menu each button opens as its own argument, aslayoutToolbardoes (the commands'getMenuTarget, orgetCommand), soresolveis asked only whether a command shows, and only for the commands that decide it. WithoutmenuTarget,resolvesays which menu a button opens, as before.
- #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 verbdoc.pages.setScale(pages, measure): one change can set the scale of many pages, and its undo puts back what each page had. Thepages.scaleSetevent andPageScaleResultcarrypages,measureand the newlayout;pagestays as the first ofpages. A pending scale change shows in the predicted page list (viewportsWithScale,scaleBackOf). The cloud layout token and manifest carry an optionalviewportsVersion.
- #1030 by @bobsingor –
doc.pages.setScale(pages, measure)sets the scale of many pages in one change, andpage.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.
- #1030 by @bobsingor – Adds the raw viewport functions:
EPDFPage_CountViewportsRaw,EPDFPage_GetViewportRaw,EPDFPage_AddViewportRaw,EPDFPage_RemoveViewportRawandEPDFViewport_Close, which read and write a page's/VPwithout parsing the page.
- #1030 by @bobsingor – Listing pages reads each page's measurement viewports from its dictionary, without loading the page, and
measure.viewportsand scale writes no longer load the page either. Apages.setScaleop 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.
- #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 andensureLoaded()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.
- #1027 by @bobsingor – The viewer takes a
featuresinput, 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 untilfeaturesturns them on.disableis deprecated and goes in 4.0.
-
#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
featuresprop says what people can do in the viewer, everywhere at once: a feature or a part by its name,trueorfalse({ 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.readOnlycomes after it, sofeaturesnever brings a tool back into a read-only viewer.featuresfollows 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
featuresturns 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.disableis deprecated and goes in 4.0. It still works: a feature in it counts asfalseunderfeatures, and a command in it stays off. Turn a feature off withfeatures, move or remove a button with the layout, and take one button out everywhere with the commands plugin'sdisabledCommands.
-
#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.
-
#1033 by @bobsingor – A door can keep a document open under a new
src:DoorEngine.follows(opened, next)says whethernextnames 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>takesfeatures, 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.disableandelement.disableare deprecated and go in 4.0.
- #1027 by @bobsingor – The viewer takes a
featuresprop, 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 untilfeaturesturns them on.disableis deprecated and goes in 4.0.
- #1027 by @bobsingor – The viewer takes a
featuresprop, 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 untilfeaturesturns them on.disableis deprecated and goes in 4.0.
- #1027 by @bobsingor – The viewer takes a
featuresprop, 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 untilfeaturesturns them on.disableis deprecated and goes in 4.0.
-
#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
replaceDefaultsmessage sets a tool's defaults to exactly the fields it gives, wheresetDefaultsmerges a patch over them.
- #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 bothlinearLayoutandgridLayout.
- #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.
-
#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
toolssetting applies its entries in order, so each tool behaves the way the list reads:- A change reaches only the tool it names. Changing
inkno longer changes the built-in highlighter, and changingline,polylineorpolygonno longer changes the Distance, Calibrate, Perimeter or Area tools. extendsstarts 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.extendsno longer copiesmeta, 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.
- A change reaches only the tool it names. Changing
-
#1029 by @bobsingor – A command's
enabled,active,visible,labelParams,iconAccent,allowedandlockedare 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.resolveCommandandlistCommandsfollow every change the viewer knows of: the viewer's own state, your app's state given throughappState, and a command that ran.executeandcanExecuteask the command at the moment they're called, so a run never goes by an answer that something outside the viewer changed since.
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.
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.
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.
- New package names. The viewer packages from 2.x,
@embedpdf/snippet,@embedpdf/react-pdf-viewer,@embedpdf/vue-pdf-viewerand@embedpdf/svelte-pdf-viewer, are replaced by@embedpdf/viewerand 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, 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-svelteand@cloudpdf/viewer-angular); - the server itself (
@cloudpdf/server), also published as the imageghcr.io/embedpdf/cloudpdf-server:3.0.0and the Helm chartoci://ghcr.io/embedpdf/charts/cloudpdf-server; - an SDK for its API (
@cloudpdf/sdk).
See the server docs.
Thanks to everyone who tried the next releases and told us what broke.
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.
Release Next v3.0.0-next.23
-
#991 by @bobsingor – The manifest and a mutation's
cacheDeltahavecontentsVersion, the document-wide pin of every page's content. -
#989 by @bobsingor –
GET …/headanswersengine, the server's engine value for each kind of cached read. The manifest no longer hasserverFonts. -
#994 by @bobsingor – Every error response is the one error body,
ErrorResponse, with its errorEngineError;AdminErrorPayloadSchemaandAdminThumbnailUnavailablePayloadSchemaare gone, and a thumbnail that isn't ready says its state indetails.state. Operations no longer get a type per error status, so a response type is named after its operation alone (DocFormsListResponse, notDocFormsList200Response). Sizes, counts, durations and the admin timestamps are integers.nextCursor,thumbnailStateandthumbnailUrlare always there, and the license status'slicense,reportingandusagetoo (nullwhen there's nothing). A union of whole-number literals, such as a rotation or a DocMDP level, is one integer enum inopenapi.json. -
#996 by @bobsingor – Every point in time is an ISO 8601 string (
format: date-time):createdAt,updatedAt,archivedAt,lastExchangedAt,firstSeenAt,lastSeenAtandconsentedAton tenants, documents, folders, grants, layers and visitors, and everyexpiresAt(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'sexpiresAt, and a token revoke'sexpiresAt, which replacesexpiresAtSeconds. A date a write takes as aDatein process is a date-time string inopenapi.json. A schema a model reuses no longer takes thenullableof the field that used it first: a grant'screatedAtandupdatedAt, and a visitor'sfirstSeenAtandlastSeenAt, read as non-null. -
#997 by @bobsingor – Names and units follow one rule: a document's
baseShaandstorageSizeBytesarebaseSha256andsizeBytes, and so is a layer's and a visitor's layer'sstorageSizeBytes; the init request'scontentLengthanduploadTtlSecaresizeBytesanduploadTtlSeconds; token issue's and the download link'sexpiresInisexpiresInSeconds; folders move-into takesdocIds(its 404 namesdetails.docIds); usagemetricsarepdfViews,pdfUploadsandstorageBytes, and a module's meters move to their ownmoduleMetersmap; 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,
nullto keep the viewer's value, and a document'sopenDestinationis always there. A line'scaptionEnabledis a boolean, nevernull. A grant create takesnullfororiginsandexpiresAt, as a grant read says them, meaning any origin and no expiry. -
#1005 by @bobsingor – A document head's
permissions.flags(the namedPdfPermissionFlags) replaces the rawbitsword. -
#982 by @bobsingor – A widget reads
hasMark:truewhen 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,resumedordeduped;imported,dedupedoraccepted), nottag, as every call's answer does. Form fields are taggedkind(wasfamily) and a widget saysfieldKind. The contract test checks that a union is taggedtype,kind,statusorsubtype. -
#992 by @bobsingor – The contract declares
EmbedPDF-Versionas a literal global header, so every generated SDK sends the major and minor of the release it was generated from.
-
#993 by @bobsingor –
openapi.jsonwrites a field's stored value and a measure out once, asFormValueEntryandPdfMeasurement, 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_SCHEMASis 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
identityis still parsed strictly, and the OpenAPI projection maps that strict twin to the sameIdentitycomponent, soopenapi.jsonis unchanged.
-
#991 by @bobsingor – Searches pin the manifest's
contentsVersionandlayoutVersion, copied rather than computed, and a write'scontentsVersionis absorbed into the cached manifest. -
#989 by @bobsingor – Cached reads copy each kind's engine value from
/headinto their URLs, with the shape this client reads. An answer that names another engine value (EmbedPDF-Engine) makes the next cached read learn/headagain. -
#994 by @bobsingor – Every server error reads as an
EngineErrorwith the server's code:GrantExpired,OriginNotAllowed,OriginRequired,EngineBusyand the rest of the codes the server sends are the error's code, notForbiddenorUnknown. A code this client doesn't know falls back to the HTTP status. -
#996 by @bobsingor – A grant session's
expiresAtis 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.
-
#997 by @bobsingor – Reads the renamed engine fields (
displaySha256,contentsSizeBytes,baseSha256, and the editing session'sexpiresInSeconds). -
#995 by @bobsingor –
GrantSessionOptions.visitorStoreis aVisitorStore, 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.changedwhen 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
originsayssubject,at(ISO 8601),serverSequenceandtransaction; the grant's callbacks areonIdentityRequestedandonOpenRequested, and itsresume()takesvisitorIdentity.
-
#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 hasserverFonts. -
#994 by @bobsingor – Every error response is one type,
ErrorResponse, with its errorEngineErrorand acodefrom one list, replacingEngineErrorPayload,AdminErrorPayloadand the per-operation error types such asDocHead404Response. A response type is named after its operation alone (DocFormsListResponse, notDocFormsList200Response). Sizes, counts, durations and timestamps are integers, andnextCursor,thumbnailStateandthumbnailUrlare always there. A signature'sfieldMdpandlockareFieldLockSpec, whosepermissionis aDocMdpPermissionthat 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…Atfields and everyexpiresAtwere numbers in milliseconds or seconds. A token revoke takesexpiresAtinstead ofexpiresAtSeconds. A grant'screatedAtandupdatedAt, and a visitor'sfirstSeenAtandlastSeenAt, are no longer typed nullable. -
#997 by @bobsingor – Names follow one rule:
sizeBytes(documents, layers, versions and the init request),baseSha256, a manifest'sbaseSizeBytes,uploadTtlSeconds(also onuploads.create),expiresInSeconds,docIds,md5,displaySha256andsourceSha256,contentsSizeBytes,changedRefs, usage metricspdfViews,pdfUploadsandstorageByteswith module meters in a typedmoduleMetersmap, asubmit-formaction's named flags, a seed value's…Requiredbooleans andparserVersion, and the path argumentsdocId,annotationKey,sha256anddisplaySha256./access, the event stream'ssessionevent and object-number reservations sayexpiresInSeconds. Action trees dropwarningFlags. -
#995 by @bobsingor – A destination's
x,yandzoomare always there,nullto keep the viewer's value, and a document'sopenDestinationis always there. A line'scaptionEnabledis a boolean, nevernull. A grant create takesnullfororiginsandexpiresAt, as a grant read says them. -
#993 by @bobsingor – A field's stored value and a measure are one type each,
FormValueEntryandPdfMeasurement, replacing the per-family and per-kind copies such asFormFieldTextValueEntryandAnnotationLineMeasure. 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) replacesbits. -
#982 by @bobsingor –
WidgetAnnotationhashasMark:truefor 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()andupload()resolve{ status, document }(wastag). Form fields are taggedkind, and the init and import answers saystatus. -
#992 by @bobsingor – Every request sends
EmbedPDF-Version, the version the SDK was generated from.
-
#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 withlayoutVersioninstead 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 –
/headcarries 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 inEmbedPDF-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 carriesserverFonts. -
#994 by @bobsingor – Every error response is
{ error: { code, message, details? } }with a code fromEngineErrorCode. An engine error no longer carriesname. A license refusal isLicenseInvalidwith the license status's code indetails.licenseCode; a usage limit says itsmetricandlimitindetails; a thumbnail that isn't ready says its state indetails.state;BadInputisInvalidArg; 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
expiresAtare 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'sbaseSizeBytes,uploadTtlSeconds,expiresInSeconds(also the editing session's on/access, the event stream and object-number reservations),docIdsand the camelCase usage metrics (module meters inmoduleMeters), and names its path parametersdocId,annotationKey,sha256anddisplaySha256. -
#992 by @bobsingor – Every response says which version the server is, in
EmbedPDF-Server-Version. A request'sEmbedPDF-Versionis answered within the server's major; another major, or a value that isn't<major>.<minor>, gets a 400 naming both versions. CORS allowsEmbedPDF-Versionand exposesEmbedPDF-Server-Version.
-
#995 by @bobsingor – A grant create takes
origins: nullandexpiresAt: null, as a grant read says them: any origin and no expiry. -
#1005 by @bobsingor – The head and
/accesscarry named permission flags, not the raw word;/accessno longer sends theadvisory. -
#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.applyparses its body withRedactionApplyScopeInputSchema, 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, nottag. Form fields are taggedkind. -
#1000 by @bobsingor – The image encoder and the appearance batch say
mimeType, as engine-core's render results do.
-
#999 by @bobsingor –
cssToScriptColor(css)takesstring | null;nullis transparent. -
#1003 by @bobsingor – A script's page move is the effect
{ type: 'goToPage', pageIndex }(wasgotoPagewithpage). -
#1002 by @bobsingor – A script's field input says
kind(wasfamily), as engine-core's form fields do. -
#1000 by @bobsingor –
ScriptUiEffectis taggedtype, as effects are things that happen (waskind). The script host ends withdestroy()and saysdestroyed.
-
#999 by @bobsingor –
writableTarget(target)takesPdfLinkTarget | null, noundefined. -
#982 by @bobsingor – A signature field's widget with a mark in it is the
widget-markkind, which has no style rows, so a style panel offers nothing that wouldn't show.widgetKindOftakes the widget (itsfieldFamilyandhasMark), anddrawsLiveis exported. -
#1003 by @bobsingor – Geometry names are spelled out:
anchoredGeometry,unanchoredGeometry,effectiveGeometry,obbFromGeometry,isRotatableGeometry. -
#1002 by @bobsingor –
fieldKindOf()replacesfieldFamilyOfKind(), and a widget'sfieldKindreplacesfieldFamily. -
#1000 by @bobsingor – The snap settings name their units:
alignmentThresholdPxandrotationThresholdDeg.
-
#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.
-
#999 by @bobsingor –
widgetScene(drawing, placement)takes aWidgetScenePlacement(wasWidgetPlacement, 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.
-
#1003 by @bobsingor – Follows engine-core: form fields are
FormField. -
#1002 by @bobsingor – Follows engine-core: form fields are tagged
kind.
- #1003 by @bobsingor –
RotationreplacesPageRotation, besideRect,PointandSize.
- #1000 by @bobsingor – The QuickJS sandbox ends with
destroy()and saysdestroyed, as every other object does.
-
#999 by @bobsingor – A settings declaration's
wholenames 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 (defaultsandwhole) instead of thewholelist.MirrorSpec.load()answerscursor?: number, nonull. -
#1003 by @bobsingor –
PluginDefinition<State, Capability, PluginSettings>replacesPluginDef<S, C, T>, and the generics ofPluginContext<State, PluginSettings>andStateCell<State>are named. -
#1000 by @bobsingor –
destroy()is the one verb that ends an object's life, neverdispose(): prepared and staged prints,Scope(withdestroyed), event hook sources, the settings store and the test kernel.acquire(get, release)names its second argument for what it does.Kernel.getStatus()replacesstatus(). A document's page-list counter ispagesSequence(onDocumentMetaandDocumentPagesChangedEvent), notrevision, which in a PDF means a saved file revision.PendingPageis taggedkind. Settings events carrychangedKeys, as metadata's do. Mirror specs takeonChanged. A document's grant question isopenRequest, as the engine names it, andretry()takesvisitorIdentity.changes.listPending()and the page view'sgetPending(page)start with a verb.
-
#999 by @bobsingor –
validateChain(cms, trust, at?)takestrust: TrustPort | null, noundefined. -
#1000 by @bobsingor –
SignatureVerdict.validationTimereplacesvalidatedAt, which wasn't a time, andvalidateSignatures()takesvalidationTime(wasat). Times are ISO 8601 strings:ParsedCms.signingTime,BuildDetachedCmsInput.signingTimeand a timestampValidationTime'sgenTime.
-
#997 by @bobsingor – Reads a signature's
contentsSizeBytes. -
#1003 by @bobsingor – Follows engine-core: a signature is
Signature.
- #1003 by @bobsingor –
PageGeometryreplacesPageGeom, and anAnchorsaysfractionXandfractionY(werefxandfy).
- #999 by @bobsingor –
defaultPaintFonts(fontFamily)takesstring | null, noundefined.
-
#999 by @bobsingor –
resolveLayout(option, defaults, env)takesoption: LayoutOption | undefined, nonull. -
#1003 by @bobsingor –
CustomSlotContextreplacesCustomSlotCtx. -
#1000 by @bobsingor –
OverflowRowis taggedkind, as things that are are.
-
#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'scontentVersion, inserts a page or deletes one, and a write'scacheDeltacarries it when it moved. A search token pinscontentsVersionandlayoutVersioninstead ofepoch, andsearchContentEpochis 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 aTokenPinand the decoders return one aspin.CACHED_READ_KINDS,SHAPES,tokenPinOf,EngineValuesandTokenPinare exported from the wire entry.DocumentHeadgainsengine, this server's engine value for each kind.DocumentManifestno longer carriesserverFonts, and render and appearance tokens carry the engine value in its place. The layout and search tokens dropformat(LAYOUT_FORMATandSEARCH_RESULT_FORMATare gone): their shape isshape.PAGE_TEXT_VERSIONandLINE_BREAKS_VERSIONversion 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? } }), andEngineErrorSchemafor the error inside it, replacingEngineErrorPayloadSchema. A serializedEngineErrorno longer carriesname.EngineErrorCodeis 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), andisEngineErrorCodetells whether a value is one.SignatureWireComponentsnamesDocMdpPermissionandFieldLockSpecfor the OpenAPI document. -
#996 by @bobsingor – Every point in time on the wire is an ISO 8601 string: an access's
expiresAtand its CDN'scdn.expiresAt(DocumentAccessInfo,CdnAccessInfo,AccessResponseSchema), a layer version'screatedAt, and a prepared signature'sexpiresAt(now typedIsoDateTimeSchema). 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-formaction reads and writesexclude,includeNoValueFields,format,methodand the rest flat on its payload or action, without aflagsobject or a raw word;encodeSubmitFormFlagsis the inverse ofdecodeSubmitFormFlags. An action tree dropswarningFlags(itswarningsname them). A seed value saysfilterRequired,subFiltersRequired,parserVersionRequired,digestMethodsRequiredandreasonsRequiredinstead ofrequiredFlagsandpresentFlags, and itsversionisparserVersion. A form submission's intent dropsflagsRaw. - One name, one meaning. Mutation results list what they touched in
changedRefs(waschanged). - Units and algorithms in names. An attachment's
sizeandchecksumaresizeBytesandmd5; a font program'sdisplayHashandsourceHasharedisplaySha256andsourceSha256; a version'sbyteLengthissizeBytes; a signature'scontentsSize(andprepare's) iscontentsSizeBytes; the head, the manifest and the version list saybaseSha256, the headsizeBytesand the manifestbaseSizeBytes(wasbaseByteLength); an editing session'sexpiresIn(EditSessionAccess,EditSessionStatus, an object-number reservation) isexpiresInSeconds. - Path parameters are spelled out in
wireTemplates::annotationKey,:sha256and:displaySha256. Thedocument.fonts.programworker request names its program bydisplaySha256, andsignatures.finalizeCandidatetakescontentsSizeBytes.
- Flags are named booleans. A
-
#995 by @bobsingor – One spelling for "nothing" (naming.md, "Nothing: left out or
null"):- A destination always has its axes:
PageDestination'sx,yandzoom(andPdfDestination'sleft,topandzoom) are always there,nullto keep the viewer's value, never left out. DocumentActionsSnapshot.openDestinationis always there,nullwhen the document has none.CommentThreadReview.mineis always there:nullwhen the reviewer has none, or when nocurrentUserIdwas given.- An annotation create's
groupId: nullis 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
nmstill gets a fresh name;nm: nullnow writes none, as a file from a tool that names nothing reads. It used to mint one too. A copy leavesnmout. - A widget's
fontFamily,fontSizeandfontColortake values only: a font can't be removed, sonullis 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
captionEnabledreadsfalsewithout/Cap, the PDF's default, and takes nonull. A polygon's and polyline's keepnullfor no caption and no placement. OpenOptions.passwordisstring, left out for none.LineCaptionPatchandShapeCaptionPatch, unused, are gone.
- A destination always has its axes:
-
#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) joinAnnotation,FormField,PdfLinkTargetandPdfActionNodein the wire components. Each of the six, a widget'sfieldFamilyand an error'scodenow describe what a client reads a kind or value it doesn't know as.openUnionOf()andopenUnionsIn()in@embedpdf/engine-core/conformancefind the unions with a catch-all in a schema. -
#985 by @bobsingor – Page text ends its lines in
\nand leaves out the characters a reader can't see as text. A line break PDFium extracts as\r\ngives\n: its\rkeeps 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-andserumreadVeritaserum. Character positions don't change, so selections, highlights and search hits are where they were. New exports:toPageText(the projection),isNoncharacterandtoLineBreaks.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_VERSIONis now 2.Every other string the engine returns ends its lines in
\ntoo: an annotation'scontents(its rich text's plain projection joins paragraphs with\n) and a hard line break inside a rich text run, whichRichTextRun.textnow spells\n. -
#1005 by @bobsingor – A PDF's permissions are named flags,
PdfPermissionFlags:print,modifyContents,copy,modifyAnnotations,fillForms,copyForAccessibility,assembleandprintHighQuality(pdf.js's names), replacingPdfBitsand itsbit3…bit12. A document head's and security state'spermissions.flagsreplaces the rawbitsword, andPdfPermissionInfocarriesflagswith nobits. Theadvisory(canPrint, …) andadvisoryFromPdfBits()are gone:materializePdfPermissions(flags)says whatpdf.permissionsgrants.permissionFlagsOf(word)replacesdecodePdfBits(), and the permission checks takepermissionFlags. -
#982 by @bobsingor – A widget reads
hasMark:truewhen it is a signature field's widget with a mark in it, because the field is signed or a mark was drawn in withforms.setSignatureAppearance. A new signature field's widget is predicted with its appearance (its box), andWIDGET_STYLE_NAMESlists the fields that make up a widget's style. -
#990 by @bobsingor – Responses are read tolerantly, as
docs/conventions/api-evolution.mdasks, 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'sorigin,IdentitySchema,RedactionApplyScopeSchema,BundleLimitsSchema,ImageResourceKeysSchema); requests are still parsed strictly, withLineLeaderWriteSchema,IdentityInputSchemaandRedactionApplyScopeInputSchema.An annotation of a subtype the client doesn't know reads as
unsupportedinstead of failing the whole list, keeping the fields every annotation has, withrawSubtypeCodeandrawSubtypeNamefrom the body when it carries them and0andnullwhen 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 errorcodeasUnknown, a widget'sfieldFamilyand a form field'sfamilyasunknown, a measure asunknown, a link or outline target asunsupported, an action asunknownand a field's value entry asunsupported.Every other enum, literal and union a response carries is marked closed with the new
closed(), next toreadsUnknownAs()andwithCatchAll()for open ones, andreadingProblems()andwithUnknownFields()in@embedpdf/engine-core/conformancecheck a schema against the convention. -
#1003 by @bobsingor –
FormField(withTextField,CheckboxField,RadioField,ComboBoxField,ListBoxField,PushButtonField,SignatureFieldandUnknownField) andSignaturereplace the…DTOnames. The deprecatedPoint,Rect,SizeandRotationaliases andPointSchema/RectSchemaare gone: use thePdf…names. Exported functions takeoptions, neveropts. -
#1002 by @bobsingor – A form field is tagged
kind, notfamily, as naming.md tags things that are:field.kind === 'checkbox', the typeFormFieldKind, a draft's and a patch'skind, and a widget annotation'sfieldKind. A values import's diagnostics sayunsupported-kindandwrong-kind. -
#992 by @bobsingor –
API_VERSIONis the version this release speaks, the major and minor of its package version, withparseApiVersionandapiVersionOfto read one. -
#1000 by @bobsingor – An event's
originspells out its fields:subject(wassub),atas an ISO 8601 string (wasts, milliseconds),serverSequence(wasserverId) andtransaction(wastx);stream.desyncedcarriesat, and the event stream'slastServerSequence()replaceslastServerId(). A grant's callbacks areonIdentityRequestedandonOpenRequested, andresume()takesvisitorIdentity. Render results and appearance pictures saymimeType, as attachments and stamps do (wascontentType).
- #999 by @bobsingor – A widget's
dashArraydoc says what the code does: left out on a dashed border is the default pattern, andnullis no pattern.
-
#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(wascontentType), as render results do.
-
#997 by @bobsingor – Reads and writes a
submit-formaction'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: nullasks for no group, and still gives each copy a fresh name, now thatnm: nullasks 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/Contentsreads with\nline breaks and is written with\r, as Acrobat writes it. Hard line breaks in rich text runs read as\nand are written as\r. -
#1003 by @bobsingor – Follows engine-core's names.
-
#1002 by @bobsingor – Follows engine-core: form fields are tagged
kind.
-
#999 by @bobsingor – The viewer takes
nullforidentityandscope, as its settings read them:identity: nullis nobody, andscope: nulllets the user do everything. -
#1003 by @bobsingor – Follows the plugins:
CommandDefinition,FormField,selectionHandleGeometry,CustomSlotContext, and an actions adapter'sgoToPage(pageIndex). -
#1000 by @bobsingor – Follows the plugins:
EpdfAttachmenthascreate,delete,canCreateandcanDelete;EpdfViewManagerhasdeletePaneandpaneDeleted$;EpdfLink.readAllLinks,EpdfStamp.getAssetBytes,EpdfFonts.readProgram,EpdfActions.readActionTree; a command'sshortcutLabel.
-
#999 by @bobsingor – The viewer takes
nullforidentityandscope, as its settings read them:identity: nullis nobody, andscope: nulllets the user do everything. -
#1003 by @bobsingor – Follows the plugins:
CommandDefinition,FormField,selectionHandleGeometry,CustomSlotContext, and an actions adapter'sgoToPage(pageIndex).
- #1000 by @bobsingor – Follows the plugins: the attachment state's
canCreate,OverflowRow.kind,destroy().
-
#999 by @bobsingor – The viewer takes
nullforidentityandscope, as its settings read them:identity: nullis nobody, andscope: nulllets the user do everything. -
#1003 by @bobsingor – Follows the plugins:
CommandDefinition,FormField,selectionHandleGeometry,CustomSlotContext, and an actions adapter'sgoToPage(pageIndex).
- #1000 by @bobsingor – Follows the plugins: the attachment state's
canCreate,OverflowRow.kind,destroy().
-
#999 by @bobsingor – The viewer takes
nullforidentityandscope, as its settings read them:identity: nullis nobody, andscope: nulllets the user do everything. -
#1003 by @bobsingor – Follows the plugins:
CommandDefinition,FormField,selectionHandleGeometry,CustomSlotContext, and an actions adapter'sgoToPage(pageIndex).
- #1000 by @bobsingor – Follows the plugins: the attachment state's
canCreate,OverflowRow.kind,destroy().
-
#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 throughgetPageBox(), and a link anchor dispatches{ type: 'annotation', annotation }, as the actions plugin's triggers are.
- #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.
-
#997 by @bobsingor –
SubmitIntentandActionSubmitRequestdropflagsRaw: an intent'sformat,methodand resolved fields already say what the flags meant. -
#1003 by @bobsingor – The UI adapter's page move is
goToPage(pageIndex, context)(wasgotoPage(page, …)). The host contract'sAnnotationCommitEntry,AnnotationCommitResultandAnnotationCommitSinkare spelled out. Read shapes arereadonly. -
#1000 by @bobsingor –
readActionTree()replacesgetActionTree(): a read from the engine isread*.ActionTriggerandActionTriggerEventare taggedtype(wasscope); a trigger's annotation isannotation(wasref) and an event's name isevent(wasname), asActionTreeSourcesays. The host contract's realm ends withdestroy().
-
#999 by @bobsingor –
chrome.marqueeis one look: a change replaces it whole, and a color it leaves out follows the accent again. The otherchromegroups still merge per key. -
#1003 by @bobsingor – The sub-capabilities are
AnnotationSelectionCapability,AnnotationDraftCapability,AnnotationTextCapability,AnnotationToolsCapability,AnnotationStampsCapability,AnnotationLinksCapabilityandCommentsCapability(were…Api).AnnotationToolDefinitionreplacesAnnotationToolDef. Read shapes arereadonly. -
#1000 by @bobsingor – The selection is
selection.select(refs)andselection.getSelected(), as page-edit, attachment and outline have them (wassetandlist).CommentThreadChangedEventis taggedtype(waschange). The host contract's functions start with a verb:getAuthority,getPictureEpoch,getPictureVersion,isPending,getDistanceCreationPage. The snap settings arealignmentThresholdPxandrotationThresholdDeg.
- #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.
- #1000 by @bobsingor – Attachments are created and deleted, as the engine's
attachments.create/deletesay:create(),delete(),canCreate(),canDelete()and the state'scanCreate(wereadd,remove,canAdd,canRemove).onChangedsays'created'and'deleted'.
- #997 by @bobsingor – Reads a file's
sizeBytesandmd5.
-
#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 likeenabled, again whenever the viewer's state or your app's changes. The values go intolabel, into the translated words underlabelKeyor the command's id, where a numbercountpicks the plural form, and into every sentence that names the label. AlabelParamsthat throws gives no values. Without the i18n plugin,label's slots are filled too. -
#1003 by @bobsingor –
CommandDefinitionreplacesCommandDef. -
#1000 by @bobsingor – A bound command's formatted shortcut is
shortcutLabel;shortcutstays the key a command definition takes.
- #1000 by @bobsingor –
readProgram()replacesgetProgram(): a read from the engine isread*.
- #997 by @bobsingor – Reads a program's
displaySha256andsourceSha256.
-
#1003 by @bobsingor –
FormToolDefinitionreplacesFormToolDef, and form fields areFormField. Read shapes arereadonly. -
#1002 by @bobsingor – Form fields are tagged
kind:list({ kind }), thefillablesetting's field kinds (FormFieldKind), a form tool'sfieldKindandAuthorableFormKind. -
#1000 by @bobsingor –
WidgetActivationResultis taggedstatus, as every call result is (waskind).FormUiEffectis taggedtype. The scripting realm ends withdestroy().
-
#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.
-
#1004 by @bobsingor – A fallback language in
loadersnow 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 inlocales. A language in bothlocalesandloadersshows itslocalesstrings until its loader has run, and the loader's language then replaces them. When the fallback language can't load,onLocaleLoadFailedfires and languages show without it. -
#1006 by @bobsingor –
interpolate(text, params)fills a string's{name}slots ast()does, for text that has no translation.TranslateOptions.paramstakes a readonly record.
- #1000 by @bobsingor – Follows core's settings events (
changedKeys).
- #1000 by @bobsingor – An
InteractionHandlersaysonPointerDown,onPointerMove,onPointerUpandonPointerCancel, as aTooldoes (wasonDown,onMove,onUp,onCancel).
- #1003 by @bobsingor – Follows core-geometry:
Rotation.
-
#1003 by @bobsingor – Read shapes are
readonly. -
#1000 by @bobsingor –
readAllLinks()replaceslistAllLinks(): a read from the engine isread*.LinkActivationis taggedstatus, as every call result is (wasoutcome).
- #1003 by @bobsingor – Read shapes are
readonly.
- #1000 by @bobsingor – Follows core's settings events (
changedKeys) and mirror specs (onChanged).
-
#999 by @bobsingor – The
formatandqualitysettings readnullwhile the engine chooses, soupdateSettings({ format: null })gives the choice back; they used to readundefined, which a change could never set.snapshot.boxis 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
FullPageSettingsandTilesSettings(were…Options). -
#1000 by @bobsingor – The tile settings name their units:
bleedPxandengageRatio(werebleedandengageAt). Results saymimeType. The host contract's view demand ends withdestroy(), andgetKeptAppearances()starts with a verb.
-
#1003 by @bobsingor –
highlight.blendModeis engine-core'sBlendMode; theSearchBlendModecopy is gone. -
#1000 by @bobsingor –
refresh()resolves nothing, as every plugin's does; the result is in the state and the events.
- #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 withpermission-denied(namingdoc.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.
-
#1003 by @bobsingor –
SelectionHandleGeometryandselectionHandleGeometry()replace the…Geomnames. Read shapes arereadonly. -
#1000 by @bobsingor – The drag setting names its unit:
dragThresholdPx.
-
#1003 by @bobsingor –
getSignature()returnsSignatureInfo, aslistSignatures()does: the field's facts and itsverdict(nulluntil checked, or for an unsigned field). ThePreparedSignaturealias is gone:prepareSignature()resolvesSignaturePrepared. -
#1000 by @bobsingor –
refresh()resolves nothing, as every plugin's does. The signing key issigningKey(setting andsign()option) and its typeSigningKey(werekeyandSignatureKey: in naming.md a key is a lookup key).PlaceMarkResultis taggedstatus, as every call result is (waskind).validate()takesvalidationTime(wasat).
- #1002 by @bobsingor – Follows engine-core: form fields are tagged
kind.
-
#999 by @bobsingor –
reveal()'srectisrect?: Rect: left out is the whole page, andnullis no longer taken. AzoomBoxchange that gives a color asundefinedfollows the accent, instead of storingundefined. -
#1003 by @bobsingor – Read shapes are
readonly, the settings included. Follows core-geometry and core-stage:Rotation,PageGeometry. -
#1000 by @bobsingor –
StageViewState.pageIndexreplacescursor.getPageBox()replacesgetPageFrame(), sincePageFrameis a setting. A reveal's alignment isalign?: RevealAlignment, its valuesArrivalAlignValue(wereanchor,RevealAnchorandRevealAnchorValue, a copy of it). Settings events carrychangedKeys.
-
#1003 by @bobsingor –
createAsset()takesCreateAssetInput(wasAddAssetInput). Read shapes arereadonly. -
#1000 by @bobsingor –
getAssetBytes()replacesreadAssetBytes(): it's synchronous.StampLibraryChangedEventis taggedtype(wasreason) and says'asset-created','asset-deleted'and'deleted', asonAssetCreated,onAssetDeletedandonLibraryDeleteddo.ImportLibraryOptions.assetKindreplaceskind, whichCreateLibraryOptionsuses for the library's.
- #1000 by @bobsingor –
deletePane(),DeletePaneOptions,onPaneDeletedandPaneDeletedEventpair withcreatePane()(wereremovePane,RemovePaneOptions,onPaneRemovedandPaneRemovedEvent).
-
#999 by @bobsingor – The viewer takes
nullforidentityandscope, as its settings read them:identity: nullis nobody, andscope: nulllets the user do everything. -
#1003 by @bobsingor – A viewer command is a
CommandDefinition(wasCommandDef). -
#1006 by @bobsingor – A command of yours can have
labelParams, which gets the same context asenabled: plugins by name throughget, yourappState, the document and the viewer. Its values fill the{name}slots in the command's label, and a numbercountpicks the plural form of translated words. -
#1004 by @bobsingor –
stringstakes a language's words as a function that loads them the first time the language shows, andplugins.i18n.fallbackLocalesets the fallback language, also shown when the browser asks for none of the viewer's languages.plugins.i18ntakes onlyfallbackLocale.document:downloadsaves the document under its name. -
#1000 by @bobsingor –
ViewerLifetime.destroy()replacesdispose(). The signature setting's key issigningKey. -
#1011 by @bobsingor – Selected redaction marks can be applied from the
annotationbar: its newannotation:apply-redactioncommand shows when every selected annotation is a redaction mark, and asks first in the same confirmation asredaction:apply, counting only those marks and the other annotations under them. The confirmation's title takes plural forms instringsnow (demo.redactConfirmTitle), and the command's label iscommands.redact.apply, such as{ one: 'Apply Redaction', other: 'Apply {count} Redactions' }.
-
#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
fewandmanyand Arabic's six forms, instead of choosing between a singular and a plural word or a "Label: 3" wording.attachments.countPluralandcomments.countPluralare gone:attachments.count,comments.count,demo.searchResults,demo.redactConfirmBody,demo.redactConfirmCollateralandstylePanel.selectedtake plural forms instrings, such as{ one: '{count} file', other: '{count} files' }.
- #1004 by @bobsingor –
stringstakes a language's words as a function too, such assv: () => import('./sv.json'): they load the first time the viewer shows that language, which shows once they're in.plugins.i18n.fallbackLocalesets 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.i18ntakes onlyfallbackLocalenow; the languages arelocaleandstrings, 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 ofdocument.pdf.
-
#1003 by @bobsingor – Follows the viewer chrome:
CommandDefinition. -
#1000 by @bobsingor – Follows the viewer chrome: the signature setting's key is
signingKey.
-
#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.
- #997 by @bobsingor – A built-in program's facts say
displaySha256.
-
#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 takeoptions. -
#1000 by @bobsingor – Follows engine-core: encoded pictures say
mimeType.
- #1000 by @bobsingor – Follows core's
changes.listPending().
- #1000 by @bobsingor – Follows core's mirror specs (
onChanged).
-
#997 by @bobsingor – Reads a mutation's
changedRefs. -
#1000 by @bobsingor – Activating an item resolves a
LinkActivationtaggedstatus. Follows core's mirror specs (onChanged) andpagesSequence.
- #1000 by @bobsingor – Follows core's settings events (
changedKeys).
- #1003 by @bobsingor – Follows the plugins' names.
Release Next v3.0.0-next.22
-
#978 by @bobsingor – Every markup annotation carries
richText, its comment with formatting, ornullfor a plain comment, in reads, creates and updates. The rich text model is named once, asRichTextDocumentandRichTextDocumentInput. -
#967 by @bobsingor –
deployment.modules(GET /v1/deployment/modules, API token) lists the installed server modules:ModuleManifestwith itsModulePermissions andModuleMeters, all named components.tenants.usagetakesfromandto(UTC days,tothe day after the last) in place ofperiod, and itsmetricshold modules' meters next to the core's. -
#971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation's
colormay benull: no stroke. A read givesnullfor a file's empty or missing stroke color.
- #972 by @bobsingor –
dashArrayon an annotation's create and update and on a widget placement takes at least one length (minItems: 1): an empty pattern is refused.
-
#978 by @bobsingor – Annotations, drafts and patches of every markup kind have
richText, the comment with formatting (RichTextDocument,RichTextDocumentInput), ornullfor a plain comment. -
#967 by @bobsingor –
deployment.modules()lists the installed server modules: their names, permissions and meters.tenants.usagetakesfromandtofor a window of UTC days, and itsmetricsinclude modules' meters. -
#971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation's
colormay benull: no stroke.
- #967 by @bobsingor – Modules describe themselves, and count their usage. A module has a
name(required) and adescription, and declaresmeters(each with alabeland aunit) that its routes count withreq.meters.count(meter, { oncePerDay })for the document's tenant. A permission can say how it relates to the core's:replaces(protected-display.viewreplacesdoc.render) andbypassedBy(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/moduleslists the installed modules as they declare themselves, with the API token. Tenant usage is counted per UTC day:tenants.usagetakesfromandtoin place ofperiod, 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.
- #967 by @bobsingor –
defineServerModuletakes aname(required), adescriptionandmeters; a request counts the module's meters withreq.meters.count(meter, { oncePerDay }). Permissions takereplacesandbypassedBy.startTestServer's tenant has the given modules turned on, so their routes answer instead of403 FeatureNotEnabled.
-
#973 by @bobsingor – A record changes its kind to a sibling:
withValuestakes asubtypethe annotation can become now (canChangeKind; not when it's locked), and the patch and the pending view are the new kind's.setFieldsgives 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. NewselectionProperties(model, annotations): the properties a style panel shows for selected annotations, led by asubtypechoice (labelannotation.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. NewrestyleRuns(doc, change)andwithoutStyle(style, keys)change every run's own style. A whole free text restyled by hand now restyles all of its text:setTextFormatand a font, size or text color insetFieldsset 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
colormay benull: a shape or line drawn without a stroke. A color property'sallowsNonesays a panel may offer none, which writesnull: 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.
- #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.
- #974 by @bobsingor –
standardFontForFacemoved 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.
- #980 by @bobsingor – A bar can sit by the snapshot tool's box:
{ at: 'snapshot' }, beside{ at: 'selection' }and{ at: 'annotation' }.
-
#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, andfieldTheKindCannotHold(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 withInvalidArg(details.field'subtype'), naming the kinds it can become. A value the new kind has no field for is refused, never dropped (details.fieldnames it): clear it first, in the same change, as a replacement's strikeout clears itsintent.applyAnnotationPatchandmergeAnnotationPatchpredict the new kind, a field only it has readingnull, andannotationPatchBetweenstatessubtypewhen 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'sfallbacksends 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 theRichTextDocumenta free text has, ornullwhen the comment is plain text, andcontentsis its plain projection. A create or update withrichTextbrings itscontents;contentsalone on a formatted comment replaces its paragraphs with plain ones and keeps its body;richText: nullkeeps the text and drops the formatting.contentsandrichTextgiven together must say the same text, line breaks however spelled, for every kind. Links, popups and widgets have norichText. The rich text schemas are namedRichTextDocumentandRichTextDocumentInputamong the annotation wire components. -
#971 by @bobsingor – A square, circle, polygon, polyline, line or ink annotation takes
color: nullfor no stroke, and keeps itsstrokeWidth. A shape whose file gives it no stroke color readscolor: null.runNoStrokeConformanceandNO_STROKE_FIXTURE_PDFcheck both engines read, write and draw it as Acrobat does.
- #972 by @bobsingor – A dashed border whose
dashArrayis 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: nullis no pattern: written as none, it reads backnull. A write refuses an emptydashArray: an empty pattern is a solid line, which isborderStyle: 'solid'.
- #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 withInvalidArg, and so is a value the new kind has no field for: clear it first, in the same change.
-
#973 by @bobsingor – The runtime has
EPDFAnnot_SetSubtype: an annotation's kind changed in place, its/Subtypewritten 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
/BaseFontis its PostScript name rather than the family it was registered under, so two weights of one family are two fonts in the PDF and inEPDFFont_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
/Cis 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 theEPDFAnnot_SetNoColorbinding, which writes a color entry as an empty array.
-
#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.
/Rectfollows 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/Dstill draws the default dash.
-
#973 by @bobsingor – An update with a sibling
subtypewrites 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:
richTextreads its/RC(nullwithout one) and a write sets/RCand/Contentstogether, as Acrobat writes a note's, without touching its appearance. Writingcontentsalone on a formatted comment rewrites its/RCtoo, 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/DAalone, so a comment in another font no longer changes it. -
#971 by @bobsingor –
color: nullon a square, circle, polygon, polyline, line or ink is written as/C [], the empty color ISO 32000 defines as no color. A shape whose/Cis empty or left out readscolor: null, where it read red before.
- #980 by @bobsingor – New
<epdf-snapshot-layer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<epdf-snapshot-menu>: your UI by the snapshot, once it's taken.EpdfRenderhascanSnapshot(),getSnapshot(),clearSnapshot()andsnapshotChanged$.copyImagecomes from/runtime, besidesaveFile.
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
-
#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.onInputmay return the document the host keeps (text typed at the caret in a style chosen there), which the editor shows at once, andTextBoxEditorAnnotation.draftRichTextreturns 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
hairlinedraws 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). NewsnapshotBoxPaintandSNAPSHOT_BOX_DASH, the look of the snapshot tool's box, with the--epdf-snapshot-box-filland--epdf-snapshot-box-strokevariables.standardCommandsBrowserhascopyImage, and itssaveFiletakes the content type.
-
#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 asubtypechoice 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 fromselection.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.
- #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.
- #980 by @bobsingor – New standard commands:
tool:snapshot, not allowed withoutdoc.content.copy(commands.notAllowed.doc-content-copy);snapshot:copy(Mod+C),snapshot:save(a PNG named after the document and the page) andsnapshot:clear(Escape), each enabled while there is a snapshot.StandardCommandsPlatformhascopyImage(image), andsaveFiletakes 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.
- #980 by @bobsingor – Labels for the snapshot tool and its commands (
commands.tool.snapshot,commands.snapshot.copy,.save,.clear) in every language.
- #980 by @bobsingor –
renderPagerenders part of a page:rect, in page space, cut at the page's edge (one that misses the page isinvalid-input), sized bywidthorscale.rotationturns the picture. Either one renders for its caller alone, outside the layers' cache. Newsnapshottool, 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 atsnapshot.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. NewcanSnapshot()(doc.renderanddoc.content.copy),getSnapshot(),clearSnapshot(),onSnapshotChanged, thesnapshotsettings (scale,box.fill,box.stroke) and, on the host lens,getSnapshotBox(page).
-
#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.kindlabel 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;Escapelets it go. New commandstool:snapshot,snapshot:copy,snapshot:saveandsnapshot:clear, thesnapshotbar, and thesnapshotsfeature fordisable. A PDF that forbids copying has no Take a Snapshot. In all fifteen languages.
- #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.
- #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.
Release Next v3.0.0-next.21
- #956 by @bobsingor –
tenants.update(PATCH /v1/tenants/:tenantId) sets a tenant'sfeatures, the server modules it may use, and tenant records carryfeatures.TenantFeature({ id, stopped?: 'cap' }) is a named component.
- #956 by @bobsingor –
tenants.update({ tenantId, features })sets the server modules a tenant may use, and tenant records havefeatures.
-
#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 uncaughterrorevent frompg.Pool. The pool now drops that connection and opens a new one for the next query.createPostgresDbtakesonIdleConnectionErrorto report these, andcloudpdf-serverlogs each one's message as a warning. -
#955 by @bobsingor –
buildApptakes the deployment's license aslicense: the runtimecreateLicenseRuntimemade, and nothing else. It replaceslicenseGate. Any other object, including a copy of a runtime, stops the build with an error namingcreateLicenseRuntime. The runtime is sealed: its methods can't be replaced, andbuildAppenforces the license from the runtime behind it.createLicenseRuntimetakes onlydb,env,secretResolverandstartTimer, 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 get403 FeatureNotEnabled, and a feature held as{ id, stopped: 'cap' }answers402 FeatureStopped. A new tenant has none: the operator turns modules on per tenant withPATCH /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.
- #955 by @bobsingor – Test a module in a real server from published packages:
startTestServerfrom@cloudpdf/server-modules/testingstarts@cloudpdf/serverwith your modules mounted, on127.0.0.1with its own in-memory database, files and credentials, licensed by a development key (CLOUDPDF_LICENSE_KEYorlicenseKey).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;apiTokencalls as the deployment;close()removes everything. The kit also exportsHostedModule, the typedefineServerModulereturns, so a module's declarations build with the kit as its only dependency.
- #957 by @bobsingor – A floating bar's place takes
hideWhenIdle(FloatPlace) in place ofhideWhileScrolling, andhideWhenIdleOf(data, id)reads it in place ofhideWhileScrollingOf, through the bar it rides along: the bar rests out of sight while nothing moves, instead of hiding while the pages scroll.
- #957 by @bobsingor – The Stage ref from
@embedpdf/angular/stagehaslistCurrentPages(): the pages you're on, the current spread while it fits across the view, else the current page.
-
#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
turnGesturessetting (defaulttrue) turns this off, leaving page turns tonextPage(),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()andpreviousPage()step past those pages, andcanGoNext()andcanGoPrevious()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.
-
#958 by @bobsingor – The View menu's Scrolling group gains Page by page (
view:scroll-paged, iconpageByPage), 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 onfloworlayoutgreys them out. The label is in all 15 languages. -
#957 by @bobsingor – The page number:
- The
pagerbar 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.pageandpageNumber.pagessay{current} / {total}and{first}–{last} / {total}in every language. It names the pages the buttons step past, the Stage'slistCurrentPages(): "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, andpage:next,page:previous,page:firstandpage:lastdon'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.hideWhileScrollingis 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.
- The
-
#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.
- #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. Thepage-loadingpart is still the circle, so restyling it works as before.
-
#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: truein its place, which replaceshideWhileScrolling. 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 instringsare gone with it.
- #950 by @KleiKodesh – An
/XYZdestination that leaves out trailing parameters, such as[page /XYZ 10 700], keeps the left and top it has instead of reading all three asnull./XYZis now read throughFPDFDest_GetViewand the null-parameter mask like every other view type. A0zoom still reads asnull, which means the same.
- #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 withoverflow: hiddenand content off to one side.
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.
Release Next v3.0.0-next.19
- #918 by @bobsingor – Share links are grants. The operations are
grants.*under/v1/tenants/{tenantId}/grants, the scope isgrants.manage, and the public exchange isPOST /v1/grant-sessionswith{ grant, passphrase }. Answers saygrant/grants, the record sayspassphraseProtected, and create and update takepassphrase. A grant has aname(1 to 100 characters, trimmed, or null). New grants aregrt_…;shr_…ids keep working. The errors areGrantPassphraseRequiredandGrantExpired, a layer names itsgrantId, and everyShare*schema and type isGrant*.
- #918 by @bobsingor – Opens a grant with
open({ kind: 'grant', grant, passphrase }), and the document's grant isdoc.grant. The client half isexchangeGrant,grantSessionSource,GrantSessionSourceandGrantExchangeError, and it exchanges at/v1/grant-sessions.
- #918 by @bobsingor –
client.sharesisclient.grants, with a grant'snameandpassphrase.
- #918 by @bobsingor – Share links are grants: routes under
/v1/tenants/{tenantId}/grants, thegrants.managescope, and the public exchange atPOST /v1/grant-sessions, which takes{ grant, passphrase }. Migration 047 renamesshare_grantstograntsandshare_visitorstogrant_visitorswith their indexes and constraints, renamespassword_hashtopassphrase_hash, and adds a grant'sname. New grants aregrt_…, andshr_…grants keep working. Session tokens namegrant:<id>, andsecurity_eventsrecordsgrant.created,grant.updated,grant.archivedandgrant.revoked.
- #918 by @bobsingor – A document from a grant is
src: { grant, passphrase, restart };passwordstays the PDF's own. The exchange helpers areexchangeGrant,grantSessionSourceandGrantExchangeError.
- #918 by @bobsingor – A document from a grant is
src: { grant, passphrase, restart };passwordstays the PDF's own. The exchange helpers areexchangeGrant,grantSessionSourceandGrantExchangeError.
- #918 by @bobsingor – A document from a grant is
src: { grant, passphrase, restart };passwordstays the PDF's own. The exchange helpers areexchangeGrant,grantSessionSourceandGrantExchangeError.
- #918 by @bobsingor – A document from a grant is
src: { grant, passphrase, restart };passwordstays the PDF's own. The exchange helpers areexchangeGrant,grantSessionSourceandGrantExchangeError.
- #918 by @bobsingor – A document from a grant is
src: { grant, passphrase, restart };passwordstays the PDF's own. The exchange helpers areexchangeGrant,grantSessionSourceandGrantExchangeError.
-
#918 by @bobsingor – A document opened with a grant reports what it waits for as
grantRequest, andretry()takes the grant'spassphrase. -
#923 by @bobsingor –
createKernel({ fetch })takes your ownfetchfor{ kind: 'url' }documents, to add headers or cookies; it gets the URL and aninitwith the document's cancel signal, andretry()calls it again. A{ kind: 'url' }source takes anidof its own. A download the server refuses with 401 or 403 fails aspermission-denied, and one that isn't a PDF (a sign-in page, say) asinvalid-input. New exports: theHostFetchtype andisPdf(bytes).
- #923 by @bobsingor – Zoom limits:
ZoomLimitsis a view's zoom range,resolveZoomLimits(minZoom, maxZoom)makes one insideZOOM_MINandZOOM_MAX(aminZoomabovemaxZoomcounts asmaxZoom), andclampZoom(zoom, limits)keeps a zoom inside it.resolveZoom()andzoomAround()take the limits as a last argument; without it they keep the full range.
- #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 andpanelOf(place)reads the panel a place names, andvalidateLayout()names a panel the layout doesn't have, with the closest one that exists.
- #923 by @bobsingor – An item without its own
importancehas its group's, as the docs say, instead of3.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 at5stays in the bar. An item's ownimportancestill wins, and a custom item without a command is still pinned.
- #918 by @bobsingor – The open input for a CloudPDF grant is
{ kind: 'grant', grant, passphrase?, restart? }(OpenInputGrant), and a document opened with one hasdoc.grant(DocumentGrant), whoseresume()takespassphrase.ShareOpenRequestisGrantOpenRequest, withpassphraseProvided, andSharePasswordRequiredisGrantPassphraseRequired.
-
#920 by @bobsingor – The Stage draws the
zoomtool's box while you drag, dashed in the accent color (the stage'szoomBoxsetting, 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 ownfetchfor documents at a URL, to add headers or cookies. -
#923 by @bobsingor –
EpdfStageRef(and so the<epdf-stage>component) hascanZoomIn()andcanZoomOut(), whether the zoom is below the Stage'smaxZoomor above itsminZoom.
-
#920 by @bobsingor – The Stage draws the
zoomtool's box while you drag, dashed in the accent color (the stage'szoomBoxsetting, 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 ownfetchfor documents at a URL, to add headers or cookies. Each download calls the latest prop.
-
#920 by @bobsingor – The Stage draws the
zoomtool's box while you drag, dashed in the accent color (the stage'szoomBoxsetting, 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 ownfetchfor documents at a URL, to add headers or cookies. Each download calls the latest prop.
-
#920 by @bobsingor – The Stage draws the
zoomtool's box while you drag, dashed in the accent color (the stage'szoomBoxsetting, 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 ownfetchfor documents at a URL, to add headers or cookies. Each download calls the latest prop.
-
#920 by @bobsingor – Theming for the zoom tool's box:
--epdf-zoom-box-filland--epdf-zoom-box-stroke, which win over the stage'szoomBoxsetting, pluszoomBoxPaint(colors, accent)andZOOM_BOX_DASHto 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.
- #920 by @bobsingor – The standard commands have
tool:zoom, the marquee zoom tool, onZ(Acrobat's key), next totool:pointer(V) andtool:pan(H).
- #923 by @bobsingor – The standard
zoom:inandzoom:outcommands are off at the Stage'smaxZoomandminZoom.
- #920 by @bobsingor – Labels for the
tool:zoomcommand (commands.tool.zoom) in all eight languages.
- #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 iszoom-inon 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'].
-
#920 by @bobsingor – The
zoomtool's box. On the host lens,beginZoomDrag,moveZoomDrag,endZoomDrag({ zoomOut })andcancelZoomDragrun the drag, andgetZoomBox()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 withscrollBehavior. A click (under 4 pixels) zooms one step around the point.createZoomDragHandler(stage, interaction)connects it to the interaction hub. The newzoomBoxsetting ({ fill, stroke },nullfollows the accent) colors the box.zoomIn()andzoomOut()take{ around }, likezoomToandzoomBy.reveal()with a fit now stops at the zoom limit (64×) instead of zooming past it on a tiny rect. Under a tool with agapCursor(pan, zoom), the pan fallback no longer takes drags between pages. A fit mode, a level orresetSettings()asked for again now applies after a zoom the user made: before,fitAutomatic()after a zoom step, pinch, double-tap or zoomedrevealdid nothing when automatic was already the setting, and so didzoomTo()with the last level set. -
#923 by @bobsingor – The Stage has zoom limits: the
minZoomandmaxZoomsettings,0.05and64by default (5% to 6400%). Nothing zooms past them: notzoomIn(), 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; aminZoomabovemaxZoomcounts asmaxZoom.canZoomIn()andcanZoomOut()say whether the zoom is belowmaxZoomor aboveminZoom, for disabling your buttons.zoomIn()andzoomOut()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.
- #923 by @bobsingor –
<epdf-pdf-viewer [fetch]>: your ownfetchfor documents at a URL, to add headers or cookies. It follows its input, likesrc.
-
#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-threadand thecomment-itemmenu, and the iconscircleCheckandsend. -
#918 by @bobsingor – The grant prompt (
grantPromptin every locale) asks for a grant's passphrase or its questions. -
#920 by @bobsingor – Marquee Zoom in the zoom menu: the
tool:zoomcommand switches to thezoomtool. 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(groupsedit,more,history),outline(filter,items) andattachments(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, andadd,removeandreplacechange 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 withplace: { panel: id }. -
#923 by @bobsingor –
FullViewertakes afetchprop, 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.stringsan app gives forsvorzh-TWnow change the built-in language's words, and the words it leaves out show in that language instead of English.
-
#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
importanceis 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 withlayout.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.thumbnailscan still setpaddingandresponsive. -
#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 withoutallow="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 ownrequestFullscreen()on the<embedpdf-viewer>element, shows thefullscreenExiticon 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:inandzoom:outcommands are off at the zoom limits, and the toolbar's − and + buttons show it: they grey out atmaxZoomandminZoom, set underplugins.stage. Zooming in and out steps through round levels (100%, 125%, 150%, 200% and so on).
- #923 by @bobsingor – The
fetchconfig key: your ownfetchfor every document at a URL (src,documentsand{ kind: 'url' }in code), to add headers or cookies. It follows its prop, aselement.fetchtoo: 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 callsfetchagain.
- #923 by @bobsingor –
<PDFViewer fetch>: your ownfetchfor documents at a URL, to add headers or cookies. It follows its prop, likesrc.
- #923 by @bobsingor –
<PDFViewer fetch>: your ownfetchfor documents at a URL, to add headers or cookies. It follows its prop, likesrc.
- #923 by @bobsingor –
<PDFViewer :fetch>: your ownfetchfor documents at a URL, to add headers or cookies. It follows its prop, likesrc.
- #923 by @bobsingor –
canDelete()answers for everything a delete takes. Deleting an annotation deletes its replies, review states, grouped parts and popups with it, andcanDelete()(on the plugin and oncomments) now checks each of them: the annotation as before, and what goes with it by itslockedflag 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()andcomments.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.
Release Next v3.0.0-next.18
-
#917 by @bobsingor – Add folders:
folders.create,folders.list,folders.get(with the path above the folder),folders.updateto rename,folders.moveIntoto move documents and folders together, andfolders.deletefor empty folders. The top level is the placeroot. Document records carryfolderId;documents.initanddocuments.importFromtake one, anddocuments.listfilters by it. Folder conflicts answer 409 withdetails.reason. -
#917 by @bobsingor – Documents have a
name: set it withdocuments.initordocuments.import(it defaults to the document id) and change it with the newdocuments.updateoperation, which needs the newdocs.updatetenant scope.documents.listgainsqto search names ignoring case,sort(createdAt,nameorsize) andorder, and no longer lists documents that are being deleted unlessstate=deletingasks for them. -
#917 by @bobsingor –
folders.deletetakesrecursive=trueto 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
scopenow takes document capabilities next to tenant scopes, and they hold for every document of the tenant.documents.downloadneedsdoc.downloadanddocuments.thumbnailneedsdoc.renderinstead ofdocs.read.docs.updaterenames and moves, and never changes content.
-
#910 by @bobsingor – The
doc.versions.*operations take the layer: their paths are/v1/docs/:docId/layers/:layerName/versions….doc.versions.listanswersLayerVersions({ 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.createandshares.update.Identityis a named component, shared withtokens.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.
StaleBaseis no longer an error code.
-
#917 by @bobsingor – Add the
foldersclient (create,list,get,update,moveInto,delete), afolderIdoption ondocuments.init,documents.importFrom,documents.listanduploads.create, andfolderIdon document records. -
#917 by @bobsingor – Add
documents.updatefor renaming documents, anameoption ondocuments.init,documents.importFromanduploads.create, and theq,sortandorderoptions ondocuments.list. Document records now carryname. -
#917 by @bobsingor – Add the
recursiveoption tofolders.delete. -
#910 by @bobsingor –
doc.versions.*takes the layer:list,signatures,signatureContents,signatureDigest,analysis,downloadandrevisionread/v1/docs/{docId}/layers/{layerName}/versions….listanswers the layer'sbaseShaand its versions (the upload, then the ones its signatures made), and another layer's version is 404. -
#909 by @bobsingor –
shares.createandshares.updatetakeidentity, and a share record returns it: who a link's visitors are, for a link made for one person.Identityis one shared type, used bytokens.issuetoo. -
#917 by @bobsingor – A tenant token's
scopeintokens.issuetakes document capabilities next to tenant scopes, and the document operations document tenant tokens as a credential.
- #910 by @bobsingor –
StaleBaseis 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.
-
#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
folderstable anddocuments.folder_id. Errors thrown with structured context now return it asdetails. -
#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/:idunder the newdocs.updatescope. 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 frommetadata.namewhen 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, afterdeletingGraceMs(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.readlists documents but no longer opens, reads or changes them. Downloading the original file needsdoc.downloadand the thumbnail needsdoc.render. A tenant token whose scope names no document capability is refused on the document routes, andtokens.issuevalidates a tenant token's scope entries.
-
#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.
- The list gives the layer's versions (the upload, then the ones its signatures made) and its
-
#909 by @bobsingor – A share link can say who its visitors are, for a link made for one person:
identityonshares.createandshares.update, the same shape astokens.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. ItsuserIdreplaces the visitor's ownvisitor_<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: truefor 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_shamoves, 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/headreports 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.
- #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, anddocuments.retry(id, { sharePassword })orretry(id, { visitor })lets it go on as the same visitor instead of opening it again.
-
#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'sidentityor else the viewer's, and the document opens again with that identity. -
#910 by @bobsingor – The
StaleBaseengine error is gone, and with it itsconflictmapping: a signature moves only its own layer, so every layer can sign.
-
#911 by @bobsingor – New
runPageFormFieldsConformancesuite checks thatpages.insertandpages.extractbring form fields, keep same-named fields apart, and survive a save in either mode. -
#907 by @bobsingor –
DocumentSharegetsopenRequest,onOpenRequest()andresume(): a passphrase, or questions asked on open, that a share link gets while a document is open are asked of the visitor, andresume({ sharePassword })orresume({ visitor })lets the document go on as the same visitor.ShareOpenRequestandshareOpenRequestOf()move here from@embedpdf/core, which re-exports the type.
-
#910 by @bobsingor – The version wire paths and resources are the layer's:
wirePaths.layerVersions,layerVersionSignatures,layerVersionSignatureContents,layerVersionSignatureDigest,layerVersionAnalysis,layerVersionDownloadandlayerVersionRevisiontake the layer name. The resources are nowlayer-versionsandlayer-version-*, so a layer's CDN grant covers only its own versions.The catalog schema is
LayerVersionsSchema({ baseSha, versions }, wasDocumentVersionsSchemawithhead). -
#909 by @bobsingor –
identityis the one word for who the user is, on both engines.OpenOptions.identityis 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'svisitoris gone (passidentityin the options instead), andDocumentShare.resume()takes{ sharePassword, identity }.doc.security.identitysays who a session acts for.The runtime entry exports
devWarn,isDevandresetDevWarningsfor engines: development-only warnings, once per key. -
#910 by @bobsingor –
EngineErrorCode.StaleBaseis gone. A signature no longer moves the document, so no layer is ever behind it and every layer can sign over its own base.
-
#911 by @bobsingor – New
EPDFDoc_ImportPagescopies pages with the form fields of their widgets, whereFPDF_ImportPagesByIndexleft each copied widget's/Parentnaming an object of the source and wrote no/AcroForm. Each field above the copied widgets is copied once, its/Kidslimited 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/DRresources,/DAand/Q,/NeedAppearances, calculation order andSignaturesExist. A/DRfont 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/DAstrings follow, comments and all. A copied pop-up's/Parentnames the copy of its annotation.New
EPDFDoc_GetImportFieldRootslists the top-level fields an import of some pages brings, andEPDFForm_GetFieldPartialNamereads a field's own/Tby object number. -
#913 by @bobsingor – New
EPDFCatalog_GetMetadatareads the document's XMP packet (the catalog's/Metadatastream) decoded, andEPDFCatalog_SetMetadatareplaces 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.
-
#911 by @bobsingor –
pages.insertandpages.extractbring 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 asname_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.updatekeeps a document's XMP packet in step with its/Infofields: 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 tonullis removed from the packet too. A packet'sdc:subjectkeyword list follows the keywords.metadata.custom.updatechanges or removes thepdfx: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.
-
#910 by @bobsingor – A document's signed bytes (
signatures.getContents,getDigest,downloadRevisionand historyanalyze) are read through its layer's version paths. -
#909 by @bobsingor – A share link takes the page's
identity(theopen()option, or the viewer'sidentity) as the visitor's answers, the same as the visitor typing them: only the fields the link asks, neveruserIdorgroupId. The share input'svisitoris 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 theidentitypassed, 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 forresume(); 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).
- #909 by @bobsingor – The viewer takes
identityagain: 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.visitoris gone;scopestays out, since the token says what the user may do.
-
#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
importstarget that names another package.#quickjs-variantnow maps to two files of this package,quickjs-variant/browser.jsandquickjs-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
.wasmrequest, and Node the wasm-file one. - Turbopack, the default bundler in Next 16, failed with "Can't resolve '#quickjs-variant'", because it doesn't follow an
-
#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,
EnterandShift+Enterstep through them, and its options sit behind a button. In the search panel,EnterandShift+Enterstep 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.