Plugins Info
@univerjs-pro/pdfs-print adds a browser Print action for the active PDF. It materializes the current pages and opens the system print dialog.
Register printing
Shell
pnpm add @univerjs-pro/pdfs-printShell
npm install @univerjs-pro/pdfs-printShell
yarn add @univerjs-pro/pdfs-printShell
bun add @univerjs-pro/pdfs-printAdd the print locale and style to the browser setup, then register the plugin after UniverPdfsUIPlugin:
TypeScript
import { UniverPdfsPrintPlugin } from '@univerjs-pro/pdfs-print'import PdfsPrintEnUS from '@univerjs-pro/pdfs-print/locale/en-US'import '@univerjs-pro/pdfs-print/lib/index.css'// Merge PdfsPrintEnUS with PdfsUIEnUS and the shared UI locales.univer.registerPlugin(UniverPdfsPrintPlugin)The plugin adds its own menu item and printing progress UI. There is no PDF print method on FUniver; users start printing through the registered browser UI.
Print is not file export
| Workflow | Result | Server required | Environment |
|---|---|---|---|
| Opens the browser or operating-system print dialog | No | Browser only | |
| Export | Returns a converted PDF File for application-controlled download | Yes | Exchange client |
The print dialog may offer “Save as PDF,” but that is a browser capability. Use exportPdfByUnitIdAsync or exportPdfBySnapshotAsync when your application needs a PDF file object, a deterministic download flow, or server-side conversion.
How is this guide?