Repository navigation
Release Next v3.0.0-next.22
Pre-release@cloudpdf/contract@3.0.0-next.22
Minor Changes
-
#978 by @bobsingor – Every markup annotation carries
richText, its comment with formatting, or
nullfor 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.
Patch Changes
- #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.
@cloudpdf/sdk@3.0.0-next.22
Minor Changes
-
#978 by @bobsingor – Annotations, drafts and patches of every markup kind have
richText, the
comment with formatting (RichTextDocument,RichTextDocumentInput), or
nullfor 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.
@cloudpdf/server@3.0.0-next.22
Minor Changes
- #967 by @bobsingor – Modules describe themselves, and count their usage. A module has a
name(required) and 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.
@cloudpdf/server-modules@3.0.0-next.22
Minor Changes
- #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.
@embedpdf/core-annotation@3.0.0-next.22
Minor Changes
-
#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.
Patch Changes
- #971 by @bobsingor – Ink is drawn as Acrobat draws it: each stroke as the smooth curves Acrobat fits to its points (cubic Béziers, never more than about 1.4 points from any point), with round caps and no join, and a stroke of one point as a filled dot. Its box and hit testing follow those curves, so a live drawing looks the same as the appearance the engine writes.
@embedpdf/core-fonts@3.0.0-next.22
Minor Changes
- #974 by @bobsingor –
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.
@embedpdf/core-ui@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – A bar can sit by the snapshot tool's box:
{ at: 'snapshot' }, beside{ at: 'selection' }and{ at: 'annotation' }.
@embedpdf/engine-core@3.0.0-next.22
Minor Changes
-
#973 by @bobsingor – An update can change an annotation's kind to a sibling: a highlight, underline, squiggly line or strikeout into another of the four, and a square into a circle and back, the kinds ISO 32000-2 describes with one table of entries. New
siblingKindsOf(subtype)lists the kinds an annotation can become,canChangeKind(annotation, subtype)says whether it can become one now, 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.
Patch Changes
- #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'.
@embedpdf/engine@3.0.0-next.22
Minor Changes
- #973 by @bobsingor –
page.annotations.update()changes an annotation's kind to a sibling: a highlight, underline, squiggly line or strikeout into another of the four, a square into a circle and back. It stays the same annotation, with its ref, replies, popup, group and author, and undo turns it back. Any other subtype is refused withInvalidArg, and so is a value the new kind has no field for: clear it first, in the same change.
@embedpdf/engine-runtime@3.0.0-next.22
Minor Changes
-
#973 by @bobsingor – The runtime has
EPDFAnnot_SetSubtype: an annotation's kind changed in place, its/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.
Patch Changes
-
#971 by @bobsingor – An ink annotation's appearance draws each stroke as Acrobat does: the cubic Béziers Acrobat fits to its points, never more than about 1.4 points from any of them, with round caps and no join, and a stroke of one point as a dot of radius 0.5.
/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.
@embedpdf/engine-services@3.0.0-next.22
Minor Changes
-
#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.
@embedpdf/angular@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – New
<epdf-snapshot-layer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<epdf-snapshot-menu>: your UI by the snapshot, once it's taken.EpdfRenderhascanSnapshot(),getSnapshot(),clearSnapshot()andsnapshotChanged$.copyImagecomes from/runtime, besidesaveFile.
@embedpdf/react@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
@embedpdf/svelte@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
@embedpdf/vue@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – New
<SnapshotLayer>in/render: the snapshot tool's box on each page, in thesnapshot.boxcolors. New<SnapshotMenu>: your UI by the snapshot, once it's taken. NewuseSnapshot(): the snapshot the tool holds, ornull.copyImagecomes from/runtime, besidesaveFile.
@embedpdf/web@3.0.0-next.22
Minor Changes
-
#975 by @bobsingor – The rich text editor keeps up with fast typing: an update that brings back text the editor already reported is late, not a change, so it no longer undoes the keystrokes typed after it.
RichTextEditorHost.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.
@embedpdf/plugin-annotation@3.0.0-next.22
Minor Changes
-
#973 by @bobsingor –
selection.update({ subtype })changes each selected annotation that can become that kind, as the same annotation, and the rest keep theirs.selection.getProperties()leads with 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.
Patch Changes
- #974 by @bobsingor – A free text box restyled after it was typed in is drawn in its new font at once: the fonts the engine answered for its old font no longer draw its body while its other runs follow the new one. An answer holds for the faces it was asked about; a box whose faces change is asked again, and typing keeps the answer.
@embedpdf/plugin-commands@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – New standard commands:
tool:snapshot, not allowed 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.
@embedpdf/plugin-i18n@3.0.0-next.22
Minor Changes
- #980 by @bobsingor – Labels for the snapshot tool and its commands (
commands.tool.snapshot,commands.snapshot.copy,.save,.clear) in every language.
@embedpdf/plugin-render@3.0.0-next.22
Minor Changes
- #980 by @bobsingor –
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).
@embedpdf/viewer-chrome@3.0.0-next.22
Minor Changes
-
#973 by @bobsingor – The style panel has a Type row for a selected highlight, underline, squiggly line or strikethrough, and for a square or circle: one button per kind it can become, each with its tool's icon. Picking one changes the annotation's kind in place, with its comment and replies. The
annotation.style.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.
Patch Changes
- #970 by @bobsingor – The style panel's font picker offers only the fonts new text can be written in. A document font that can't be chosen (one the PDF holds only the characters of, a Type 3 font, one licensed for viewing only) is no longer listed greyed; the box that has it still shows it as its font, with why it can't be chosen for another box.
@embedpdf/plugin-fonts@3.0.0-next.22
Patch Changes
- #974 by @bobsingor – A font's CSS and a box's paint fonts end their fallbacks with the standard font that stands in for the font, as the engine writes them: Latin a font lacks (Noto Sans Hebrew has none) shows in Helvetica, in the same weight, never as boxes.