API 参考

@univerjs-pro/pdfs-ui

本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。

Canvas rendering and editing UI for Web SDK PDF units, including the PDF View ribbon and virtual continuous scrolling.

TypeScript
import { UniverPdfsUIPlugin } from '@univerjs-pro/pdfs-ui'import '@univerjs-pro/pdfs-ui/lib/index.css'univer.registerPlugin(UniverPdfsUIPlugin, {  editor: { enabled: true },  thumbnailWorkerURL: new Worker(new URL('./pdf-thumbnail.worker.ts', import.meta.url), { type: 'module' }),})

editor.enabled defaults to true and controls whether the plugin registers PDF editing commands, clipboard handling, the ribbon, the inspector, and thumbnail actions. thumbnailWorkerURL accepts a string, URL, or Worker for OffscreenCanvas thumbnail rendering.

Create the worker entry referenced above:

TypeScript
import { startPdfPageThumbnailWorker } from '@univerjs-pro/pdfs-ui'startPdfPageThumbnailWorker()

Entry Points

  • Locale: @univerjs-pro/pdfs-ui/locale/*
  • Style: @univerjs-pro/pdfs-ui/lib/index.css
  • Worker runtime: startPdfPageThumbnailWorker from @univerjs-pro/pdfs-ui

The root entry also exports renderPdfPageToCanvas for rendering a PDF page into an existing canvas. See the PDF UI overview.

你觉得这篇文档如何?

© 2026 DreamNum Co., Ltd.