DrawDevice#
The DrawDevice can be used to render to a Pixmap; either by running a PDFPage with it or by calling its methods directly.
CONSTRUCTOR METHODS
- DrawDevice(matrix: Matrix, pixmap: Pixmap)#
Create a device for drawing into a Pixmap. The Pixmap bounds used should match the transformed page bounds, or you can adjust them to only draw a part of the page.
- Parameters:
- Returns:
EXAMPLE
var drawDevice = new mupdfjs.DrawDevice(mupdfjs.Matrix.identity, pixmap);
Code samples
Code samples are in TypeScript and assume that the following requirements are defined in your TypeScript file header as follows:
import * as fs from "fs"
import * as mupdfjs from "mupdf/mupdfjs"
Was this page helpful?