Single-page viewport
Fixed one-page PDFs for certificates, cards, and receipts.
viewport renders one fixed page instead of paged output. It behaves like an image render. Percentage heights resolve against the viewport. It clips overflow.
const = await (< ={{ : "100%", : "100%" }}>Certificate</>, {
: { : 1123, : 794 }, // A4 landscape in px
});Content-sized pages
Omit height to size the single page to its laid-out content. This works like a thermal receipt. Percentage heights do not resolve in this mode:
const = await (, { : { : 302 } }); // 80mm at 96 dpiviewport cannot be combined with size, landscape, margin, header, or footer. Those options work only with paged output. Hyperlinks, outline, and metadata work in both modes.
Last updated on