# canvas

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:
  - modules/canvas.js, line 9

### Classes

Canvas

### Members

#### (inner) height

Source:
  - modules/canvas.js, line 60

The width property is a positive integer reflecting the width HTML attribute of the

#### (inner) width

Source:
  - modules/canvas.js, line 37

The height property is a positive integer reflecting the height HTML attribute of the

### Methods

#### (inner) getContext(contextType, contextAttributes)

Source:
  - modules/canvas.js, line 105

The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.

##### Parameters:

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 |

#### (inner) toDataURL()

Source:
  - modules/canvas.js, line 129

The toDataURL() method is just a stub to throw an error if accidently called.