ComponentsPage
Page
Represents single page inside the PDF documents, or a subset of them if using the wrapping feature. A <Document /> can contain as many pages as you want, but ensures not rendering a page inside any component besides Document.
import { Document, Page, Text } from '@react-pdf/renderer';
const MyDocument = () => (
<Document>
<Page size="A4" orientation="landscape" style={{ padding: 40 }}>
<Text>A landscape A4 page with a 40pt margin</Text>
</Page>
</Document>
);Show previewHide preview
Valid props
| Prop name | Description | Type | Default |
|---|---|---|---|
| size | Defines page size. If String, must be one of the available page sizes. Height is optional, if ommited it will behave as "auto". | String, Array, Number, Object | "A4" |
| orientation | Defines page orientation. Valid values: "portrait" or "landscape" | String | "portrait" |
| wrap | Enables page wrapping for this page. See more | Boolean | true |
| style | Defines page styles. See more | Object, Array | undefined |
| debug | Enables debug mode on page bounding box. See more | Boolean | false |
| dpi | Enables setting a custom DPI for page contents. | Number | 72 |
| id | Destination ID to be linked to. See more | String | undefined |
| bookmark | Attach bookmark to element. See more | String or Bookmark | undefined |