Univer PDFs
Univer PDFs provides a browser PDF viewer and editor with durable document data, Facade APIs, import and export, collaboration, and printing.
What is Univer PDFs
Univer PDFs is the PDF product in Univer Office SDK. A PDF becomes a formal UNIVER_PDF unit: the imported source document is preserved as it was, and accepted edits are stored in a separate durable edit layer. The browser UI renders both layers as one continuous document.
Univer PDFs is a unit type inside Web SDK, not an SDK of its own. Web SDK provides the viewer and headless content processing. Collaboration and file conversion are part of Server SDK, and agent workflows belong to AI SDK.
Use Univer PDFs when an application needs to create or open PDFs, add editable content, preserve the appearance of an imported PDF, collaborate on changes, export the result, or hand the open document to the browser's print workflow.
Plugin mode only
There is no PDF preset package. You register the PDF model, the UI, and any optional feature plugins explicitly.
Browser compatibility
Web SDK compiles with a Chrome 88 target, but that does not mean every mainstream environment is fully supported. Web SDK is maintained to run correctly in the following browsers and Node.js versions:
| Edge | Firefox | Chrome | Safari | Electron |
|---|---|---|---|---|
| >=88 | >=90 | >=88 | >=14.1 | >=12 |
Web SDK depends on Intl.Segmenter. If the browser or runtime does not support it, add a polyfill first. The recommended polyfill is @formatjs/intl-segmenter.
When a compatibility problem occurs, try the matching polyfill first. If the problem persists, submit an issue.
Node.js compatibility
This applies only to running Web SDK inside Node.js. It does not cover running Web SDK in a browser through a Node.js-based build tool.
Web SDK runs in Node.js v18.17.0 and later.
Highlights
- The PDF unit model keeps the source document, page structure, resources, and durable editing intent in
IPdfUnitData. - Pages can be navigated and inserted, and text, lists, tables, images, dividers, and annotations can be edited.
- The browser workbench renders PDF pages and thumbnails, and handles selection, editing controls, clipboard behavior, and the inspector UI.
- Accepted changes go through durable commands and mutation batches, so save, undo, and redo operate against the same model.
- The Facade API creates, finds, edits, and saves PDF units through application-facing PDF, page, element, and native-text objects.
How to read the documentation
The documentation navigation is on the left. Pages are ordered from basic to advanced, so they can be read in sequence while building an application, or skipped to the sections a use case requires. Univer PDFs can also be selected at the top of the sidebar.
The table of contents on the right navigates between sections of the current page. To find another page, use the search bar at the top or the search shortcut (Ctrl+K or Cmd+K).
Start with the Quick Start guide.
Pre-requisite knowledge
The documentation is written to be approachable, but it does assume a baseline so that it can stay focused on Web SDK.
Readers get the most from the documentation with a basic understanding of JavaScript and the surrounding ecosystem.
If you plan to run Web SDK on Node.js, a basic understanding of Node.js is also recommended.
Collaboration, shared history, comments, and file conversion are server-side features. They are enabled by composing modules from Univer Server SDK in the backend; authentication, permissions, storage, and deployment remain the responsibility of the application. A PDF edited only in the browser requires none of them.
Extend Univer PDFs
Web SDK is designed to be extended, so it can be adapted to the target application.
How is this guide?