Core Features
Plugins Info
Univer PDFs core provides a formal PDF unit, a durable edit layer, and a browser workbench. Imported PDF content remains the source baseline, while accepted changes are stored in the unit snapshot and rendered as the current document.
Features
- PDF unit model: Stores the source document, page structure, resources, and durable editing intent in
IPdfUnitData. - Page and element operations: Supports page navigation and insertion plus editable text, lists, tables, images, dividers, and annotations.
- Browser workbench: Renders PDF pages, thumbnails, selection, editing controls, clipboard behavior, and the inspector UI.
- Command pipeline: Applies accepted changes through durable commands and mutation batches so save, undo, and redo share one model.
- Facade API: Creates, finds, edits, and saves PDF units through application-facing PDF, page, element, and native-text objects.
Preset Mode
Univer PDFs does not currently export a preset package. Create PDF applications with Plugin Mode.
Plugin Mode
Installation
Shell
pnpm add @univerjs/core @univerjs/design @univerjs/ui @univerjs-pro/license @univerjs-pro/pdfs @univerjs-pro/pdfs-uiShell
npm install @univerjs/core @univerjs/design @univerjs/ui @univerjs-pro/license @univerjs-pro/pdfs @univerjs-pro/pdfs-uiShell
yarn add @univerjs/core @univerjs/design @univerjs/ui @univerjs-pro/license @univerjs-pro/pdfs @univerjs-pro/pdfs-uiShell
bun add @univerjs/core @univerjs/design @univerjs/ui @univerjs-pro/license @univerjs-pro/pdfs @univerjs-pro/pdfs-uiUsage
TypeScript
import { UniverLicensePlugin } from '@univerjs-pro/license'import { UniverPdfsPlugin } from '@univerjs-pro/pdfs'import { UniverPdfsUIPlugin } from '@univerjs-pro/pdfs-ui'import PdfsUIEnUS from '@univerjs-pro/pdfs-ui/locale/en-US'import { LocaleType, mergeLocales, Univer } from '@univerjs/core'import { FUniver } from '@univerjs/core/facade'import DesignEnUS from '@univerjs/design/locale/en-US'import { UniverUIPlugin } from '@univerjs/ui'import UIEnUS from '@univerjs/ui/locale/en-US'import '@univerjs-pro/pdfs/facade'import '@univerjs/design/lib/index.css'import '@univerjs/ui/lib/index.css'import '@univerjs-pro/pdfs-ui/lib/index.css'const univer = new Univer({ locale: LocaleType.EN_US, locales: { [LocaleType.EN_US]: mergeLocales(DesignEnUS, UIEnUS, PdfsUIEnUS), },})univer.registerPlugin(UniverUIPlugin, { container: 'app' })univer.registerPlugin(UniverLicensePlugin, { license: process.env.CLIENT_LICENSE_TEXT,})univer.registerPlugin(UniverPdfsPlugin)univer.registerPlugin(UniverPdfsUIPlugin)const univerAPI = FUniver.newAPI(univer)const pdf = univerAPI.createPdf({ name: 'Untitled PDF' })UniverPdfsPlugin owns the PDF unit and durable commands. UniverPdfsUIPlugin owns the browser viewer and its editing controls. For viewer-only UI, register UniverPdfsUIPlugin with { editor: { enabled: false } }. Collaboration-backed applications can additionally register @univerjs-pro/pdfs-editor together with the collaboration plugins it requires.
How is this guide?