Functions & Hooks
renderToPdf
function renderToPdf(
path: string,
pages: PdfPage[],
metadata?: PdfMetadata): Promise<void>;Write a scene to a PDF, one page per entry. Geometry and text stay vectors - only images rasterize - so a chart drawn with the same components that render on screen exports as a real document rather than a screenshot.
Pages may mix element (JSX) and scene (factory nodes or a Scene)
freely. Like renderToImage, each page is a still: animated props are
read at their committed value.
Parameters
path
string
pages
PdfPage[]
metadata?
PdfMetadata = {}
Returns
Promise<void>