mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
Merge pull request #7026 from Menci/master
Add guide for force new page in print / printToPDF
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user