v33

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-2972102177.5 KB
Tools

Get Page PDF

Generates a PDF of the current page for a browser session and returns it as a binary PDF file.

post/v1/tools/page-pdf

Query parameters

sessionIdstring uuid

Optional browser session ID. If omitted, url in the request body is required.

Request body

urlstring uri required

The URL of the page to print to PDF.

landscapeboolean

Paper orientation. Defaults to false.

displayHeaderFooterboolean

Display header and footer. Defaults to false.

printBackgroundboolean

Print background graphics. Defaults to false.

scalenumber

Scale of the webpage rendering. Defaults to 1.

paperWidthnumber

Paper width in inches. Defaults to 8.5.

paperHeightnumber

Paper height in inches. Defaults to 11.

marginTopnumber

Top margin in inches. Defaults to ~0.4.

marginBottomnumber

Bottom margin in inches. Defaults to ~0.4.

marginLeftnumber

Left margin in inches. Defaults to ~0.4.

marginRightnumber

Right margin in inches. Defaults to ~0.4.

pageRangesstring

Page ranges to print, e.g. '1-5, 8, 11-13'. Defaults to all pages.

headerTemplatestring

HTML template for the print header.

footerTemplatestring

HTML template for the print footer.

preferCSSPageSizeboolean

Prefer page size as defined by CSS. Defaults to false.

Response

PDF generated successfully