Get Free Trial
API reference
Table of contents

print

print(options: Object)

[starting from version: 1.4]

Prints the content of the grid or chart via the OS print manager. To learn more about printing, see this guide: Export and print.

Parameters

  • options optional – Object. Can contain the following print properties:
    • header optional – String. The header is set in HTML format (tags, inline styles, img with base64 src), rendered in the browser and added as an image to the printed PDF file. The following tokens can be used: ##CURRENT-DATE##, ##PAGE-NUMBER##. They will be replaced by appropriate data.
    • footer optional – String. Footer is set in HTML format (tags, inline styles, img with base64 src), rendered in the browser and added as an image to the printed PDF file. The following tokens can be used: ##CURRENT-DATE##, ##PAGE-NUMBER##. They will be replaced by appropriate data.

Examples

1) Print the content:

flexmonster.print();

Try the example on JSFiddle.

2) Add header and footer:

var options = {
	header:"<div>##CURRENT-DATE##</div>",
	footer:"<div>##PAGE-NUMBER##</div>"
}
flexmonster.print(options);

Open the example on JSFiddle.

See also

exportTo
Export and print tutorial