deno.land / x / skia_canvas@0.5.8 / test / pdf.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { PdfDocument } from "../mod.ts";
const pdf = new PdfDocument({ title: "Deno Skia Canvas", author: "Dj", creation: new Date(), modified: new Date(),});
const ctx = pdf.newPage(120, 120, { x: 10, y: 10, w: 100, h: 100 });
ctx.fillStyle = "red";ctx.fillRect(0, 0, 100, 100);
ctx.fillStyle = "blue";ctx.fillRect(10, 10, 80, 80);
pdf.endPage();
pdf.save("./testdata/test.pdf");console.log("done");
skia_canvas

Version Info

Tagged at
8 months ago