# PrintDocument

Learn how to use PrintDocument class to create documents for printing or saving in this documentation topic

## Content


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
```javascript
import * as wijmo from '@mescius/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__

```javascript
doc.print();
```