5.20232.939
5.20232.939

PrintDocument

The PrintDocument class makes it easy to create documents for printing or exporting to PDF. Most browsers allow you to select the paper size, orientation, margins, and whether to include page headers and footers.

Add content

With PrintDocument, you can modify the document before printing or exporting. The append method let's you add HTML inline in your documents.

Example
import * as wijmo from '@grapecity/wijmo';

let doc = new wijmo.PrintDocument({
    title: 'PrintDocument Test' 
});

doc.append('<h1>Adding a Header to the Document</h1>');
doc.append('<p>This document will include this HTML when it is exported or printed.</p>');

print

To print the document, just call the print method

doc.print();