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:

Classes

Canvas

Members

(inner) height

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.

(inner) width

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.

Methods

(inner) getContext(contextType, contextAttributes)

Source:

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:

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