docs/module-canvas.html
jsPDF Canvas PlugIn This plugin mimics the HTML5 Canvas
The goal is to provide a way for current canvas users to print directly to a PDF.
Source:
Source:
The width property is a positive integer reflecting the width HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used. This is one of the two properties, the other being height, that controls the size of the canvas.
Source:
The height property is a positive integer reflecting the height HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used. This is one of the two properties, the other being width, that controls the size of the canvas.
Source:
The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.
| Name | Type | Description |
|---|---|---|
contextType | string |
Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is "2d", leading to the creation of a Context2D object representing a two-dimensional rendering context.
|
| contextAttributes | object | |
Source:
The toDataURL() method is just a stub to throw an error if accidently called.