mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
readme: move up note about Page.pdf working on headless only (#577)
Hard to find. From https://github.com/GoogleChrome/puppeteer/issues/576
This commit is contained in:
parent
da85b4466e
commit
f9abc8ea03
@ -604,6 +604,8 @@ Page is guaranteed to have a main frame which persists during navigations.
|
|||||||
- `left` <[string]> Left margin, accepts values labeled with units.
|
- `left` <[string]> Left margin, accepts values labeled with units.
|
||||||
- returns: <[Promise]<[Buffer]>> Promise which resolves with PDF buffer.
|
- returns: <[Promise]<[Buffer]>> Promise which resolves with PDF buffer.
|
||||||
|
|
||||||
|
> **NOTE** Generating a pdf is currently only supported in Chrome headless.
|
||||||
|
|
||||||
`page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call [page.emulateMedia('screen')](#pageemulatemediamediatype) before calling `page.pdf()`:
|
`page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call [page.emulateMedia('screen')](#pageemulatemediamediatype) before calling `page.pdf()`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@ -637,8 +639,6 @@ The `format` options are:
|
|||||||
- `A4`: 8.27in x 11.7in
|
- `A4`: 8.27in x 11.7in
|
||||||
- `A5`: 5.83in x 8.27in
|
- `A5`: 5.83in x 8.27in
|
||||||
|
|
||||||
> **NOTE** Generating a pdf is currently only supported in Chrome headless.
|
|
||||||
|
|
||||||
#### page.plainText()
|
#### page.plainText()
|
||||||
- returns: <[Promise]<[string]>> Returns page's inner text.
|
- returns: <[Promise]<[string]>> Returns page's inner text.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user