From a3045435a2ce26f32611c1a3d93c78a053a72ca0 Mon Sep 17 00:00:00 2001 From: y-yagi Date: Mon, 12 Dec 2022 21:12:18 +0900 Subject: [PATCH] docs: mention how to disable timeout for `page.pdf()` (#9167) **What kind of change does this PR introduce?** Add how to disable timeout for `page.pdf()`. **Summary** This was mentioned in the PR that adding this feature https://github.com/puppeteer/puppeteer/pull/7508 But it has lost at https://github.com/puppeteer/puppeteer/pull/8593. I'm not sure why this was removed, but I think this info is useful for users. **Does this PR introduce a breaking change?** no --- docs/api/puppeteer.pdfoptions.md | 2 +- docs/api/puppeteer.pdfoptions.timeout.md | 2 +- packages/puppeteer-core/src/common/PDFOptions.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/puppeteer.pdfoptions.md b/docs/api/puppeteer.pdfoptions.md index a1af79d0..f517c224 100644 --- a/docs/api/puppeteer.pdfoptions.md +++ b/docs/api/puppeteer.pdfoptions.md @@ -29,5 +29,5 @@ export interface PDFOptions | [preferCSSPageSize?](./puppeteer.pdfoptions.prefercsspagesize.md) | | boolean | (Optional) Give any CSS @page size declared in the page priority over what is declared in the width or height or format option. | false, which will scale the content to fit the paper size. | | [printBackground?](./puppeteer.pdfoptions.printbackground.md) | | boolean | (Optional) Set to true to print background graphics. | false | | [scale?](./puppeteer.pdfoptions.scale.md) | | number | (Optional) Scales the rendering of the web page. Amount must be between 0.1 and 2. | 1 | -| [timeout?](./puppeteer.pdfoptions.timeout.md) | | number | (Optional) Timeout in milliseconds | 30000 | +| [timeout?](./puppeteer.pdfoptions.timeout.md) | | number | (Optional) Timeout in milliseconds. Pass 0 to disable timeout. | 30000 | | [width?](./puppeteer.pdfoptions.width.md) | | string \| number | (Optional) Sets the width of paper. You can pass in a number or a string with a unit. | | diff --git a/docs/api/puppeteer.pdfoptions.timeout.md b/docs/api/puppeteer.pdfoptions.timeout.md index a124a55f..2259dd08 100644 --- a/docs/api/puppeteer.pdfoptions.timeout.md +++ b/docs/api/puppeteer.pdfoptions.timeout.md @@ -4,7 +4,7 @@ sidebar_label: PDFOptions.timeout # PDFOptions.timeout property -Timeout in milliseconds +Timeout in milliseconds. Pass `0` to disable timeout. #### Signature: diff --git a/packages/puppeteer-core/src/common/PDFOptions.ts b/packages/puppeteer-core/src/common/PDFOptions.ts index 2613b427..c11c6c68 100644 --- a/packages/puppeteer-core/src/common/PDFOptions.ts +++ b/packages/puppeteer-core/src/common/PDFOptions.ts @@ -167,7 +167,7 @@ export interface PDFOptions { */ omitBackground?: boolean; /** - * Timeout in milliseconds + * Timeout in milliseconds. Pass `0` to disable timeout. * @defaultValue 30000 */ timeout?: number;