GuidesUniver SheetsFeaturesPrintPro

Print

Facade APIPaid VersionUniver ServerUniver on Node.jsPreset
--UniverSheetsAdvancedPreset

Univer provides high-precision printing functions, supporting print preview, print settings, and export to PDF.

This feature includes the following plugin packages:

Presets Installation

import { createUniver, defaultTheme, LocaleType, Tools } from '@univerjs/presets';
import { UniverSheetsCorePreset } from '@univerjs/presets/preset-sheets-core';
import UniverPresetSheetsCoreEnUS from '@univerjs/presets/preset-sheets-core/locales/en-US';
import { UniverSheetsAdvancedPreset } from '@univerjs/presets/preset-sheets-advanced';
import UniverPresetSheetsAdvancedEnUS from '@univerjs/presets/preset-sheets-advanced/locales/en-US';
 
const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    enUS: Tools.deepMerge(
      {},
      UniverPresetSheetsCoreEnUS,
      UniverPresetSheetsAdvancedEnUS,
    ),
  },
  theme: defaultTheme,
  presets: [
    UniverSheetsCorePreset(),
    UniverSheetsAdvancedPreset(),
  ],
});

Advanced Installation

npm install @univerjs-pro/sheets-print
import { LocaleType, Tools } from '@univerjs/core';
import { UniverSheetsPrintPlugin } from '@univerjs-pro/sheets-print'
import SheetsPrintPluginEnUS from '@univerjs-pro/sheets-print/locale/en-US';
 
import '@univerjs-pro/sheets-print/lib/index.css';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: Tools.deepMerge(
      SheetsPrintPluginEnUS
    ),
  },
});
 
univer.registerPlugin(UniverSheetsPrintPlugin);