# @univerjs-pro/pdfs-ui

> Language fallback: requested `ko-KR`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/pdfs-ui](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/pdfs-ui)

- Agent Markdown: [https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/pdfs-ui.md](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/pdfs-ui.md)

- Requested language: `ko-KR`

- Content language: `en-US`

- Documentation version: `1.0.4`

- Source: [packages/plugins/univerjs-pro/pdfs-ui.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/packages/plugins/univerjs-pro/pdfs-ui.mdx)

---

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()
```

## Menu configuration

Configure the shared Ribbon through `UniverUIPlugin`'s [`menu` and `ribbonType` options](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs/ui.md#menuconfig). They are not options of `UniverPdfsUIPlugin`. For example, `pdf.menu.tool.highlight` and `pdf.menu.tool.ink` accept sibling `order` and Ribbon `gridLayout` overrides.

Import `@univerjs/ui/facade` to use [`FUniver.updateMenuConfig()`](https://docs.univer.ai/ko-KR/reference/facade/univer.md#updatemenuconfig) at runtime. [`createMenu()` and `createSubmenu()`](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs/ui.md#ifacademenuitem) also accept placement options. See the [PDF menu guide](https://docs.univer.ai/ko-KR/guides/pdfs/features/core.md#menu-order-and-grid-layout) for initialization and update examples.

The PDF Ribbon is registered only while editing is enabled. `menu` overrides do not enable it when `editor.enabled` is `false`.

## 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](https://docs.univer.ai/ko-KR/guides/pdfs/ui/overview.md).
