
Throws an error in the Worker's Promise chain.Ī few aliases are also provided for convenience: Method catchExternal exits the Worker chain - you will not be able to continue chaining Worker methods after. Using this 'exits' the Worker chain - you will not be able to continue chaining Worker methods after. thenCore returns a Worker, which is a subclass of Promise. Standard Promise method, with this re-bound to the Worker (no progress-tracking). then returns a Worker, which is a subclass of Promise. Standard Promise method, with this re-bound to the Worker, and with added progress-tracking (see Progress below). then to access), or by calling cbk if provided. Returns the property specified in key, either as a Promise (use. Saves the PDF object with the optional filename (creates user download prompt). Supported types: 'img', 'datauristring'/ 'dataurlstring', and 'datauri'/ 'dataurl'. Returns the specified data type for the image as a Promise (use.

Sends type and options to the jsPDF object's output method, and returns the result as a Promise (use. Routes to the appropriate outputPdf or outputImg method based on specified src ( 'pdf' (default) or 'img'). Each target also has its own toX method that can be called directly: toContainer(), toCanvas(), toImg(), and toPdf(). Optional type specifies other sources: 'string', 'element', 'canvas', or 'img'.Ĭonverts the source to the specified target ( 'container', 'canvas', 'img', or 'pdf'). Sets the source (HTML string or element) for the PDF.
