The Page component is used to separate content into distinct pages within a document. It creates a page break after each page.

Usage

import Document from './Document';
import Page from './Page';

const MyDocument = () => (
  <Document size="A4" orientation="portrait">
    <Page>
      <h1>My Document Title</h1>
      <p>This is the content of my first page.</p>
    </Page>
    <Page>
      <h2>Second Page</h2>
      <p>This is the content of my second page.</p>
    </Page>
  </Document>
);

Props

children
React.ReactNode
required

The content to be rendered within the page.

className
string

Additional CSS classes to apply to the page.

style
React.CSSProperties

Additional inline styles to apply to the page.