Starts a new page with the given dimensions and returns a canvas to draw on it.
Starts a new page with the given dimensions and an explicit content rect. The content rect tells PDF viewers which portion of the page holds actual content (used for cropping, thumbnails, and accessibility metadata).
[left, top, right, bottom] in page coordinates
Finalizes the document and returns the PDF data as a Uint8Array.
Finishes the current page.
PDFDocument is a class that captures drawing commands across pages and outputs a PDF.