Get PDF
AI-generatedSummary
Generate a PDF from a web page using Puppeteer.
Inputs
- url (required) — The URL of the web page to convert to PDF.
- dataPropertyName (required) — Name of the binary property where the PDF data will be stored.
- pageRanges — Paper ranges to print, e.g. 1-5, 8, 11-13.
- scale (required) — Scales the rendering of the web page. Amount must be between 0.1 and 2.
- preferCSSPageSize (required) — If true, CSS @page size takes priority over width, height, or format settings.
- format — Paper format type (Letter, Legal, A4, etc.). Only used when preferCSSPageSize is false.
- height — Sets the height of paper. Used when preferCSSPageSize is false and format is not specified.
- width — Sets the width of paper. Used when preferCSSPageSize is false and format is not specified.
- landscape (required) — Page orientation. true for landscape, false for portrait.
- margin — PDF margins. Contains top, bottom, left, right string properties.
- displayHeaderFooter (required) — If true, includes header and footer in the PDF.
- headerTemplate — HTML template for the print header. Requires displayHeaderFooter to be true.
- footerTemplate — HTML template for the print footer. Requires displayHeaderFooter to be true.
- omitBackground (required) — If true, hides the default white background, allowing PDF transparency.
- printBackground (required) — If true, includes background graphics in the PDF.
- fileName — File name to set in the binary data output. Applies to Get PDF operation.
- queryParameters — Query parameters to send with the navigation request.
Output shape
object
Returns an item containing the PDF binary data and navigation metadata. The binary key is determined by dataPropertyName. The json payload includes headers, statusCode, and the normalized URL.