Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/shapes_plus/mod.ts>PdfDocument#newPage

Used canvas library to make shapes
Latest
method PdfDocument.prototype.newPage
import { PdfDocument } from "https://deno.land/x/shapes_plus@v0.0.5.1/mod.ts";

Creates a new page and returns a 2D rendering context for drawing on it. The context extends CanvasRenderingContext2D so it has same API.

You must not use the context after calling endPage.

Parameters

w: number
h: number
optional
contentRect: Rect