@univerjs-pro/boards-print
이 API 페이지의 본문은 현재 영어로 제공됩니다. 코드 시그니처와 식별자는 언어에 따라 바뀌지 않습니다.
Print the active Univer Board page or export it as PNG or JPEG.
See Print for the end-to-end integration guide.
Register the plugin
TypeScript
import { ExportBoardImageOperation, PrintBoardOperation, UniverBoardsPrintPlugin } from '@univerjs-pro/boards-print'import '@univerjs-pro/boards-print/lib/index.css'univer.registerPlugin(UniverBoardsPrintPlugin)Merge @univerjs-pro/boards-print/locale/<locale> into your Univer locale map to localize the ribbon labels.
Run the output actions
The ribbon invokes the same operations shown below. format accepts png or jpeg.
TypeScript
await univerAPI.executeCommand(PrintBoardOperation.id)await univerAPI.executeCommand(ExportBoardImageOperation.id, { format: 'png' })Entry Points
- Locale:
@univerjs-pro/boards-print/locale/* - Style:
@univerjs-pro/boards-print/lib/index.css
The root entry also exports BoardPrintCompositionService and its element-transform contracts for custom print composition.
IUniverBoardsPrintConfig
TypeScript
import type { MenuConfig } from '@univerjs/ui'export interface IUniverBoardsPrintConfig { menu?: MenuConfig}이 가이드는 어떠셨나요?