Repository navigation
Releases: docMentis/docmentis-udoc
Releases · docMentis/docmentis-udoc
Release list
0.8.4
Built on @docmentis/udoc-wasm 0.8.6.
udoc-viewer and udoc-editor
Added
enableAnnotation: falsekeeps the user from annotating a PDF, and
enableFormFilling: falsefrom filling in its form, where the license
allows both: the Annotate tab is gone, comments and annotations are there to
read, and a press on a form field selects as on the page.
addPageAnnotationand the rest still change the annotations.--udoc-canvas-guide-backgroundsets the fill of the guide, the ruler or a
spreadsheet's row and column headers, and
--udoc-canvas-scrollbar-backgroundthat of the scrollbars beside a page.
Changed
- The guide and the scrollbars beside a page take the toolbar's color,
--udoc-color-surface-container, by default, where they took the canvas's,
so--udoc-canvas-backgroundno longer recolors them. - A scrollbar's thumb keeps 2px clear of its track's ends, as it does of its
sides, so it no longer touches the view's edge or the corner where the two
scrollbars meet. - In a PDF or a presentation, the page count beside the page number, the
pages it accepts and the thumbnails cover every page from the open, where
they grew as pages composed ahead, andpageCountis the document's total. - A presentation opens one slide at a time, in the
"spread"scroll mode,
where it opened scrolling continuously. ThescrollModeoption and
setScrollModeset the scroll mode every document opens in,null
restoring each doc type's own, and the view settings' Scroll section picks
one for the open document alone, where its pick held for every document
opened after. document:editedcarriespageCount, the document's page count, for
composedPageCount, and udoc-editor'spageActionsandpageInsertstake
apageCountoption forcomposedPageCount.
Fixed
- In a PDF or a presentation, following a link, an outline item or a page
number to a page not composed yet lands at once, where the viewer froze
until every page before it had composed. Composing ahead asks for only the
pages it adds, so its steps no longer slow down as a long document fills in. - In a PDF whose text is set in a Type 3 font, as bitmap text often is, a
selection highlights the lines it covers and a drag from between two lines
selects them, where its lines had no height to highlight or to pick. - A PDF page drawn from thousands of small pieces of text scrolls smoothly
with the pointer resting on it, where each frame stalled on finding the text
under the pointer. - A link still being followed when the viewer is destroyed no longer logs
"following a link failed".
udoc-demo
Added
?sample=opens the demo on a sample, by its file's name
(?sample=james-webb-space-telescope.pptx), and the address keeps it in
step as the sample changes.- Co-edit shows it is preparing while it loads the whole document into the
collaboration service both editors share, which takes longer than opening
it in View or Edit. - The Options dialog turns annotating and form filling off, under Features
with copy, and groups the toolbar and view items under UI.
Changed
- Switching the mode or the document adds an entry to the browser's history,
so Back returns to the one before.
0.8.3
Built on @docmentis/udoc-wasm 0.8.5.
udoc-viewer and udoc-editor
Fixed
- A document opened where another was open draws at once, where it stayed
blank until the view changed size. - A document opened where another was open scrolls whole, where a scroll
redrew only the strip it brought into view and left the rest as it was.
udoc-demo
Fixed
- The docMentis logo opens the site in the whole window, not inside the frame
a page embeds the demo in.
0.8.2
Built on @docmentis/udoc-wasm 0.8.4.
All packages
Added
- A map chart shades its regions through a three-color scale, its middle color
shown in the legend's bar as well, and labels each region with its name,
placed as PowerPoint places it.
udoc-viewer and udoc-editor
Added
exportToBytes("pdf")exports the document as a PDF of its laid-out pages,
andexportPageToBytes(page, format)a page as the bytes of a PNG,
{ png: { scale } }, or an SVG,"svg", as udoc-node's do. Both fetch the
fonts the document names first, so none is drawn in a stand-in. A
spreadsheet can't be exported to PDF yet.
udoc-node
Added
exportToBytes("pdf")exports the document as a PDF of its laid-out pages,
in its own fonts, andexportPageToBytes(index, "svg")exports a page as
SVG; both rejected before. A spreadsheet can't be exported to PDF yet.
Fixed
openRemotewith afetchthat answers in a NodeBuffergets the bytes it
answered, where it threw, and stopped the process, on Node 21 and later.
udoc-cli
Added
udoc renderwrites a page as an SVG for an--outending in.svg, and
udoc export <input> --out <file.pdf>exports the document as a PDF of its
laid-out pages.
Changed
udoc renderrefuses an--outthat isn't a.pngor a.svg, where it
wrote a PNG whatever the name.
udoc-server
Added
GET /documents/:id/layout/pages/:index.svganswers a page as an SVG, and
GET /documents/:id/layout/pages.pdfthe document exported as a PDF of its
laid-out pages,422 unsupportedfor a spreadsheet.
Fixed
- A request that opens a kept document, for a page image, its page count or a
saved copy, no longer stops the server.
udoc-demo
Added
- Published to npm: a demo app showcasing udoc-viewer and udoc-editor.
?mode=view,edit,coeditoraiopens the demo in that mode.
0.8.1
Built on @docmentis/udoc-wasm 0.8.3.
All packages
Added
- Emoji draw in color, from a font's color glyphs; one the document's fonts
lack, or sets in Segoe UI Emoji or Apple Color Emoji, draws in Noto Color
Emoji. - Saving a DOCX, PPTX or XLSX keeps its edits, by
"delta", over the
original, or"rewrite", as a new file. A delta save gave back the original
unchanged, and a rewrite was refused.
Changed
- A web font one provider can't supply is ordered from the next at once,
without laying every page out again first. - A
.udocpackage saved by 0.8.0 from a PPTX no longer loads a slide holding
a link that jumps to a slide by its number, and a link into another deck
opens it a slide later.
Fixed
- An emoji with a variation selector, such as ❤️, draws instead of leaving a
gap, and a keycap such as 1️⃣ draws its digit once, not twice.
udoc-viewer and udoc-editor
Added
goToSheet(sheet)shows a workbook's sheet, by its 0-based index or its
name, and resolves once it has painted;sheetCount,currentSheetand the
currentSheet:changedevent follow it, and an overlay frame'ssheetsays
which sheet the frame shows.sheetslists a workbook's sheets, each with its name, visibility and tab
color;sheets:changedfires as each sheet's color becomes known.
Changed
- A page is a 0-based index throughout the API:
goToPage,currentPage,
currentPage:changed,renderPageandPrintOptions.pagesnow count from
0, as the annotation calls andviewport:changedalready did. - A hidden sheet has no tab, as in Excel, where only a very hidden one had
none; and a workbook opens on the sheet it was saved showing, or its first
visible one, rather than always its first. - What the reader does — a sheet tab, a page turn, an edit — runs ahead of
background work: web fonts, thumbnails, composing ahead and loading a
workbook's other sheets, in that order. Background work waits, too, until the
reader has paused for a moment, so scrolling, hovering or typing never lands
behind it. A reader waits at most for the one background step already
running, and its paint comes before the next. - A large worksheet paints once it has loaded, without laying out every row
first: the rows on screen are laid out for the first paint, and the rest in
the background while the reader pauses. Issue #2's 32,863-row sheet paints
in about 2 seconds, from about 20. - A large worksheet no longer lays out every row again when a web font changes
its rows' or columns' sizes, or before a jump into it.
Fixed
- A page narrower than the view, which shows centred, paints once per wheel
step and relayout, not twice.
0.8.0
Built on @docmentis/udoc-wasm 0.8.2.
udoc-viewer
The viewer is rebuilt on the docMentis engine's new architecture: each
document renders in a worker, on one canvas, and the viewer is built on
@docmentis/udoc-ui, the document UI the docMentis packages share. Its API
changed;
API-COMPARISON.md maps every export
of 0.7 to what 0.8 offers in its place.
Added
- Form filling in PDFs, and audio and video playback.
- TSV and PSV files, opened as CSV is, and CSV files split by semicolons.
- Annotate tools: highlight, underline, strikeout, squiggly, note, text box, 14
standard stamps, pen, and the rectangle, ellipse, line, arrow, polygon,
polyline and cloud shapes. - Comment replies, edits and deletion in the Comments panel.
renderPage(page, { scale }),goToNextPage(),goToPrevPage(),
setFullscreen()andisFullscreen.open'spasswordoption, for a host that holds a document's password.- An annotation with
ephemeral: trueis shown but never saved or printed. setOverlaydraws any number of overlays over the pages.showDeveloperButton: diagnostics in the toolbar's menu.
Changed
UDocViewer.create(container, options)replacesUDocClient.createand
client.createViewer;loadisopen, which takes a URL, aBlobor
bytes.- Options say what they show rather than what they hide:
showToolbar: false
forhideToolbar: true,showDownloadButton: falsefor
disableDownload: true, and so on. - Events are named for what happened, ending in
edoring:page:change
iscurrentPage:changed,downloadisdocument:downloaded,printis
document:printed,annotation:addisannotation:inserted, and so on. currentPagekeeps its name;pageCountcounts the pages laid out so far.- The annotation calls and events take the engine's
Annotationtype and find
an annotation by itsname. Their events fire for undo and redo too. - The engine is located with
wasm: { baseUrl, cdnUrl }, and falls back to
jsDelivr by default. The worker starts from a blob, so a Content Security
Policy needsworker-src blob:. localeandtranslationsare options ofcreate, andtranslations
takes the UI's keys (Messages). The built-in languages are 0.7's
eleven; a Traditional Chinese tag such aszh-HKnow reads Traditional
Chinese rather than Simplified.- Supported browsers: Chrome and Edge 91, Firefox 105, Safari 16.4 and later.
- The chrome is neutral gray, and its CSS variables are renamed:
--udoc-color-*for every color it uses,--udoc-color-primaryfor your
brand color, and a fill per region such as--udoc-toolbar-background.
Removed
- ico, tga, ppm, hdr, exr and qoi images.
- The fonts panel, slide transitions and animations, and the spreadsheet's
paged view. getOutline,getPageText,getPageInfo,getFontUsage,metadata,
renderThumbnailandrenderRegion.- The document utilities:
compose,splitByOutline,extractImages,
extractFonts,parseFontInfo,compressanddecompress. - The setters for chrome the options now fix at creation, such as
setToolbarVisible.
udoc-ui, udoc-editor, udoc-node, udoc-cli and udoc-server
The first release of each.