ReoGrid ReoGrid Web

Print

There are two ways to get a worksheet out of the browser and onto paper, and one page-setup model that drives both. This page is the map — pick the route that matches the output you need.

Note: Printing, PDF export, and page layout are all Pro-edition features.

Pick your route

You want to…RouteOne-liner
Open the browser’s print dialog nowPrint to HTMLprintWorksheet(grid.worksheet)
Produce a real PDF filePrint to PDFgrid.saveAsPdf({ locale: 'ja' })
Set paper size, margins, page breaksPage Layoutws.setPrintSettings({ paperSize: 'A4' })

How to print

Step 1 — set up the page (optional, but do it for anything multi-page)

Paper size, orientation, margins, and scale live on the worksheet, and the on-screen page-break preview shows exactly where pages will split. Both output routes can reuse this model, so configuring it once keeps the screen, the print dialog, and the PDF in agreement.

const ws = grid.worksheet

ws.setPrintSettings({ paperSize: 'A4', orientation: 'landscape', scale: 1 })
ws.setShowPageBreaks(true)     // Excel-style page-break preview on the grid
ws.insertRowPageBreak(40)      // force a new page at row 40

→ Full reference: Page Layout

Step 2 — choose an output

A. Print to HTML — the sheet is converted to a styled HTML table and handed to the browser’s native print dialog. Nothing to install, no font to load; the user can also choose “Save as PDF” inside the dialog.

import { printWorksheet } from '@reogrid/pro'

printWorksheet(grid.worksheet, { usePageBreaks: true })

→ Options and details: Print to HTML

B. Print to PDF — the sheet is rendered to a real, vector PDF by our own engine: text, borders, fills, merges, and cell-anchored images, with a TrueType font embedded. No dialog, no server, no external library.

import { preloadPdfFont } from '@reogrid/pro'

await preloadPdfFont('ja')   // once — a font is required, and export stays sync
grid.saveAsPdf({ locale: 'ja', usePageBreaks: true, filename: 'report.pdf' })

→ Options and details: Print to PDF


Which one should I use?

Print to HTMLPrint to PDF
OutputBrowser print dialogA .pdf file (or raw bytes)
Entry pointprintWorksheet(ws, options)grid.saveAsPdf(options) / grid.exportPdf(options)
User interactionDialog is shown; the user confirmsSilent — downloads or returns bytes
FontsThe browser’s fontsThe locale’s font, or bytes you supply (required)
PaginationusePageBreaks: true, or one long tableusePageBreaks: true, or option-driven paging
Cell-anchored imagesNot drawnDrawn (showImages)
Custom cell typesOnly with renderHTML()Rendered by the PDF engine
Server round-tripNoneNone
Best forAd-hoc printing, “just print this” buttonsInvoices, ledgers, archived or emailed documents

Rule of thumb: if the result is a document you keep, attach, or send, use PDF. If the user just wants paper out of the printer in front of them, the HTML route is one line and needs no font.

Saving as PDF from the browser’s print dialog is not the same as PDF export: the browser re-lays out the HTML table, may add its own headers and footers, and substitutes fonts. Use Print to PDF when the output has to be exact.


  • Page Layout — paper size, margins, scale, manual breaks, page-break preview.
  • PDF Export — the full ExportPdfOptions reference.
  • Print to HTML — the full PrintOptions reference.
  • XLSX Import & Export — page setup travels with the file, so Excel paginates it the same way.
Stay Updated

Be first to know — get updates as they ship

Get notified of new releases, features, and announcements.
No spam — just updates that matter.