Add guide for force new page in print / printToPDF

This commit is contained in:
Menci 2016-08-30 08:45:39 +08:00 committed by GitHub
parent b5dec9990e
commit ec60c149f5

View file

@ -824,6 +824,8 @@ up system's default printer and default settings for printing.
Calling `window.print()` in web page is equivalent to calling
`webContents.print({silent: false, printBackground: false})`.
Use `page-break-before: always; ` CSS style to force to print to a new page.
#### `contents.printToPDF(options, callback)`
* `options` Object
@ -854,6 +856,8 @@ By default, an empty `options` will be regarded as:
}
```
Use `page-break-before: always; ` CSS style to force to print to a new page.
An example of `webContents.printToPDF`:
```javascript