Fix doc on pdf method. Minor addition to PDF path option docs. (#292)
This commit is contained in:
parent
92e64e2354
commit
da53218107
@ -529,7 +529,7 @@ Page is guaranteed to have a main frame which persists during navigations.
|
|||||||
|
|
||||||
#### page.pdf(options)
|
#### page.pdf(options)
|
||||||
- `options` <[Object]> Options object which might have the following properties:
|
- `options` <[Object]> Options object which might have the following properties:
|
||||||
- `path` <[string]> The file path to save the PDF to. If `path` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd).
|
- `path` <[string]> The file path to save the PDF to. If `path` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd). If no path is provided, the PDF won't be saved to the disk.
|
||||||
- `scale` <[number]> Scale of the webpage rendering. Defaults to `1`.
|
- `scale` <[number]> Scale of the webpage rendering. Defaults to `1`.
|
||||||
- `displayHeaderFooter` <[boolean]> Display header and footer. Defaults to `false`.
|
- `displayHeaderFooter` <[boolean]> Display header and footer. Defaults to `false`.
|
||||||
- `printBackground` <[boolean]> Print background graphics. Defaults to `false`.
|
- `printBackground` <[boolean]> Print background graphics. Defaults to `false`.
|
||||||
@ -596,7 +596,7 @@ Shortcut for [`keyboard.down`](#keyboarddownkey-options) and [`keyboard.up`](#ke
|
|||||||
|
|
||||||
#### page.screenshot([options])
|
#### page.screenshot([options])
|
||||||
- `options` <[Object]> Options object which might have the following properties:
|
- `options` <[Object]> Options object which might have the following properties:
|
||||||
- `path` <[string]> The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd).
|
- `path` <[string]> The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd). If no path is provided, the image won't be saved to the disk.
|
||||||
- `type` <[string]> Specify screenshot type, could be either `jpeg` or `png`. Defaults to 'png'.
|
- `type` <[string]> Specify screenshot type, could be either `jpeg` or `png`. Defaults to 'png'.
|
||||||
- `quality` <[number]> The quality of the image, between 0-100. Not applicable to `png` images.
|
- `quality` <[number]> The quality of the image, between 0-100. Not applicable to `png` images.
|
||||||
- `fullPage` <[boolean]> When true, takes a screenshot of the full scrollable page. Defaults to `false`.
|
- `fullPage` <[boolean]> When true, takes a screenshot of the full scrollable page. Defaults to `false`.
|
||||||
|
@ -479,7 +479,6 @@ class Page extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} filePath
|
|
||||||
* @param {!Object=} options
|
* @param {!Object=} options
|
||||||
* @return {!Promise<!Buffer>}
|
* @return {!Promise<!Buffer>}
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user