Skip to content

Commit

Permalink
readme: move up note about Page.pdf working on headless only (puppete…
Browse files Browse the repository at this point in the history
…er#577)

Hard to find. From puppeteer#576
  • Loading branch information
ebidel authored and aslushnikov committed Aug 28, 2017
1 parent da85b44 commit f9abc8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- 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()`:

```js
Expand Down Expand Up @@ -637,8 +639,6 @@ The `format` options are:
- `A4`: 8.27in x 11.7in
- `A5`: 5.83in x 8.27in

> **NOTE** Generating a pdf is currently only supported in Chrome headless.
#### page.plainText()
- returns: <[Promise]<[string]>> Returns page's inner text.

Expand Down

0 comments on commit f9abc8e

Please sign in to comment.