Back to Jspdf

autoprint

docs/module-autoprint.html

4.2.1710 B
Original Source

Methods

(inner) autoPrint(options) → {jsPDF}

Source:

Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.

Example
var doc = new jsPDF();
doc.text(10, 10, 'This is a test');
doc.autoPrint({variant: 'non-conform'});
doc.save('autoprint.pdf');
Parameters:
NameTypeDescription
optionsObject

(optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .

|

Returns:

Type jsPDF