Skip to content

Commit

Permalink
Update docs/api/web-contents.md
Browse files Browse the repository at this point in the history
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
  • Loading branch information
codebytere and jkleinsc committed Nov 9, 2020
1 parent f1a3cc4 commit 9d1a3dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/api/web-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ Returns [`PrinterInfo[]`](structures/printer-info.md)
* `pagesPerSheet` Number (optional) - The number of pages to print per page sheet.
* `collate` Boolean (optional) - Whether the web page should be collated.
* `copies` Number (optional) - The number of copies of the web page to print.
* `pageRanges` Object[] (optional) - The page range to print.
* `pageRanges` Object[] (optional) - The page range to print. On macOS, only one range is honored.
* `from` Number - Index of the first page to print (0-based).
* `to` Number - Index of the last page to print (inclusive) (0-based).
* `duplexMode` String (optional) - Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or `longEdge`.
Expand Down Expand Up @@ -1352,10 +1352,10 @@ Example usage:
const options = {
silent: true,
deviceName: 'My-Printer',
pageRanges: {
pageRanges: [{
from: 0,
to: 1
}
}]
}
win.webContents.print(options, (success, errorType) => {
if (!success) console.log(errorType)
Expand All @@ -1372,7 +1372,7 @@ win.webContents.print(options, (success, errorType) => {
* `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for
default margin, 1 for no margin, and 2 for minimum margin.
* `scaleFactor` Number (optional) - The scale factor of the web page. Can range from 0 to 100.
* `pageRanges` Object[] (optional) - The page range to print.
* `pageRanges` Record<string, string> (optional) - The page range to print.
* `from` Number - Index of the first page to print (0-based).
* `to` Number - Index of the last page to print (inclusive) (0-based).
* `pageSize` String | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
Expand Down
2 changes: 1 addition & 1 deletion docs/api/webview-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ Prints `webview`'s web page. Same as `webContents.print([options])`.
default margin, 1 for no margin, and 2 for minimum margin.
and `width` in microns.
* `scaleFactor` Number (optional) - The scale factor of the web page. Can range from 0 to 100.
* `pageRanges` Object[] (optional) - The page range to print.
* `pageRanges` Record<string, string> (optional) - The page range to print.
* `from` Number - Index of the first page to print (0-based).
* `to` Number - Index of the last page to print (inclusive) (0-based).
* `pageSize` String | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
Expand Down

0 comments on commit 9d1a3dd

Please sign in to comment.