Render a URL or HTML to PDF with Puppeteer's page
pdfRender a URL or HTML to PDF with Puppeteer's page.pdf() options (format letter by default, scale, margins, header/footer templates, printBackground, pageRanges). Price: $0.005 a call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | The page to render (https). Set url or html, not both. | |
| html | No | HTML to render instead of a URL. | |
| cookies | No | Cookies to set before loading | |
| deliver | No | {store: "1d"|"7d"|"30d"|"365d", name?}: keep the PDF in file storage and answer with metadata instead of bytes | |
| viewport | No | {width,height,deviceScaleFactor,isMobile,hasTouch,isLandscape}; default 1920x1080 | |
| userAgent | No | ||
| pdfOptions | No | Puppeteer page.pdf() options as documented at pptr.dev/api/puppeteer.pdfoptions. | |
| addStyleTag | No | [{content|url}] | |
| bestAttempt | No | Proceed when awaited events fail or time out | |
| gotoOptions | No | {waitUntil: load|domcontentloaded|networkidle0|networkidle2, timeout} | |
| addScriptTag | No | [{content|url}] | |
| authenticate | No | {username,password} | |
| waitForTimeout | No | Extra wait in ms (0-120000) | |
| waitForSelector | No | {selector, visible?, hidden?, timeout} | |
| emulateMediaType | No | screen|print | |
| allowResourceTypes | No | ||
| allowRequestPattern | No | ||
| rejectResourceTypes | No | e.g. ["image"] | |
| setExtraHTTPHeaders | No | Extra HTTP headers | |
| rejectRequestPattern | No | ||
| setJavaScriptEnabled | No |