Now Available: Notion-like editor templateNotion-style editor for Tiptap Cloud

Page formats constants

The PAGE_FORMATS constant provides a set of predefined page formats (such as A4, A3, Letter, etc.) with real-world dimensions and recommended margins, already converted to pixels. This is useful for quickly setting up the pageFormat option or custom layouts in the Tiptap Pages extension.

Import

import { PAGE_FORMATS } from '@tiptap-pro/extension-pages'

API

PAGE_FORMATS: {
  [format: string]: {
    id: string
    width: number // in pixels
    height: number // in pixels
    margins: {
      top: number
      right: number
      bottom: number
      left: number
    }
  }
}

Available Formats

FormatWidth (px)Height (px)Margins (px: top/right/bottom/left)
A4794112395 / 76 / 95 / 76
A31123159195 / 76 / 95 / 76
A541979476 / 57 / 76 / 57
Letter818106096 / 96 / 96 / 96
Legal818140496 / 96 / 96 / 96
Tabloid1060163596 / 96 / 96 / 96