@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'sviewports, anddoc.pages.setScaleanswers with the new layout. The changes endpoint takes thepages.setScaleop. 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
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.
@cloudpdf/sdk@3.1.0
Minor Changes
- #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.
@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/scaleis a one-op change, so its opId undoes it. The changes endpoint appliespages.setScale.
@cloudpdf/viewer@3.1.0
Minor Changes
- #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.
@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
memoormemoByKeyas 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.
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, aslayoutToolbardoes (the commands'getMenuTarget, orgetCommand), soresolveis
asked only whether a command shows, and only for the commands that decide it. Without
menuTarget,resolvesays 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 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.
@embedpdf/engine@3.1.0
Minor Changes
- #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.
@embedpdf/engine-runtime@3.1.0
Minor Changes
- #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.
@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.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.
@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 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.
@embedpdf/viewer-angular@3.1.0
Minor Changes
- #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 until
featuresturns them on.disableis 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
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 oncefeaturesturns 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 asfalseunder
features, 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'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 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.
@embedpdf/viewer-react@3.1.0
Minor Changes
- #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 until
featuresturns them on.disableis deprecated and goes in 4.0.
@embedpdf/viewer-svelte@3.1.0
Minor Changes
- #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 until
featuresturns them on.disableis deprecated and goes in 4.0.
@embedpdf/viewer-vue@3.1.0
Minor Changes
- #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 until
featuresturns them on.disableis 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
replaceDefaultsmessage sets a tool's defaults to exactly the fields it gives, where
setDefaultsmerges 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 bothlinearLayoutandgridLayout.
@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
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
@embedpdf/plugin-commands@3.1.0
Patch Changes
-
#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.executeand
canExecuteask the command at the moment they're called, so a run never goes by an answer that
something outside the viewer changed since.