Skip to content

Commit e4632bc

Browse files
committed
Update doc
1 parent 59e6043 commit e4632bc

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,33 @@ It returns the full HTML extracted from the URL.
4949

5050
### .pdf(url, [opts], [cb])
5151

52-
`opts` provided are passed to [page.goto](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options).
52+
It generates the PDF version of a website behing an URL.
53+
54+
`opts` provided are passed to [page.pdf](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions).
55+
56+
It returns an [tmpStream](https://github.com/Kikobeats/create-temp-file2#create-temp-file2), with `path` where the temporal file live and `cleanup`/`cleanupSync` methods for clean the temporal file.
57+
58+
If you want to customize where tmpStream live, pass [opts.tmpOptions](https://github.com/Kikobeats/create-temp-file2#createtempfileoptions).
5359

5460
Additionally, you can setup:
5561

56-
### media
62+
#### media
63+
64+
Changes the CSS media type of the page using [page.emulateMedia](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype).
65+
66+
#### device
67+
68+
Providing a valid [deviceDescriptor](https://github.com/GoogleChrome/puppeteer/blob/master/DeviceDescriptors.js) object.
69+
70+
The device will be used to recover and setup `userAgent` and `viewport`.
71+
72+
#### userAgent
73+
74+
It will setup User Agent using [page.setUserAgent](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetuseragentuseragent) method.
5775

58-
Providing a valid [page.emulateMedia](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype) value. Default is `'screen'`.
76+
#### viewport
77+
78+
Providing a valid [page.setViewport](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetviewportviewport) object.
5979

6080
### .screenshot(url, [opts], [cb])
6181

@@ -73,11 +93,11 @@ Additionally, you can setup:
7393

7494
Providing a valid [deviceDescriptor](https://github.com/GoogleChrome/puppeteer/blob/master/DeviceDescriptors.js) object.
7595

76-
#### userAgent
96+
The device will be used to recover and setup `userAgent` and `viewport`.
7797

78-
It will setup an user Agent using
98+
#### userAgent
7999

80-
Providing a valid [page.setUserAgent](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetuseragentuseragent) method.
100+
It will setup User Agent using [page.setUserAgent](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetuseragentuseragent) method.
81101

82102
#### viewport
83103

0 commit comments

Comments
 (0)