npm @embedpdf/core 3.1.0
Release v3.1.0

one hour ago

@cloudpdf/contract@3.1.0

Minor Changes

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

@cloudpdf/engine@3.1.0

Minor Changes

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

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

@cloudpdf/sdk@3.1.0

Minor Changes

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

@cloudpdf/server@3.1.0

Minor Changes

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

@cloudpdf/viewer@3.1.0

Minor Changes

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

@embedpdf/core@3.1.0

Minor Changes

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

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

Patch Changes

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

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

@embedpdf/core-ui@3.1.0

Minor Changes

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

@embedpdf/engine-core@3.1.0

Minor Changes

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

@embedpdf/engine@3.1.0

Minor Changes

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

@embedpdf/engine-runtime@3.1.0

Minor Changes

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

@embedpdf/engine-services@3.1.0

Minor Changes

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

@embedpdf/plugin-measurement@3.1.0

Minor Changes

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

@embedpdf/viewer-angular@3.1.0

Minor Changes

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

@embedpdf/viewer-chrome@3.1.0

Minor Changes

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

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

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

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

Patch Changes

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

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

@embedpdf/viewer@3.1.0

Minor Changes

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

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

@embedpdf/viewer-react@3.1.0

Minor Changes

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

@embedpdf/viewer-svelte@3.1.0

Minor Changes

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

@embedpdf/viewer-vue@3.1.0

Minor Changes

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

@embedpdf/core-annotation@3.1.0

Patch Changes

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

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

@embedpdf/core-stage@3.1.0

Patch Changes

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

@embedpdf/svelte@3.1.0

Patch Changes

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

@embedpdf/plugin-annotation@3.1.0

Patch Changes

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

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

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

@embedpdf/plugin-commands@3.1.0

Patch Changes

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

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

@cloudpdf/web@3.1.0

@cloudpdf/plugin-protected-display@3.1.0

@cloudpdf/server-modules@3.1.0

@cloudpdf/viewer-angular@3.1.0

@cloudpdf/viewer-react@3.1.0

@cloudpdf/viewer-svelte@3.1.0

@cloudpdf/viewer-vue@3.1.0

@embedpdf/core-acrojs@3.1.0

@embedpdf/core-fonts@3.1.0

@embedpdf/core-form@3.1.0

@embedpdf/core-geometry@3.1.0

@embedpdf/core-js-sandbox@3.1.0

@embedpdf/core-signature@3.1.0

@embedpdf/core-text@3.1.0

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

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

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

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

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

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

@embedpdf/engine-runtime-wasm32@3.1.0

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

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

@embedpdf/angular@3.1.0

@embedpdf/react@3.1.0

@embedpdf/vue@3.1.0

@embedpdf/web@3.1.0

@embedpdf/plugin-actions@3.1.0

@embedpdf/plugin-attachment@3.1.0

@embedpdf/plugin-fonts@3.1.0

@embedpdf/plugin-form@3.1.0

@embedpdf/plugin-history@3.1.0

@embedpdf/plugin-i18n@3.1.0

@embedpdf/plugin-interaction@3.1.0

@embedpdf/plugin-link@3.1.0

@embedpdf/plugin-metadata@3.1.0

@embedpdf/plugin-outline@3.1.0

@embedpdf/plugin-page-edit@3.1.0

@embedpdf/plugin-redaction@3.1.0

@embedpdf/plugin-render@3.1.0

@embedpdf/plugin-search@3.1.0

@embedpdf/plugin-selection@3.1.0

@embedpdf/plugin-shell@3.1.0

@embedpdf/plugin-signature@3.1.0

@embedpdf/plugin-stage@3.1.0

@embedpdf/plugin-stamp@3.1.0

@embedpdf/plugin-view-manager@3.1.0

Don't miss a new core release

NewReleases is sending notifications on new releases.