Print

Type: print

Request that the browser prints the page to a PDF.

Parameters

Name
Type
Required
Description

size

string

The size of paper the page should be printed to. Default: A4 Accepted: ["A4"]

margin

integer

The margin of the page in pixels when the page is printed to PDF. Default: 20

orientation

string

Should execution of further actions continue or throw an error if this action fails. Default: portrait Accepted: ["portrait", "landscape"]

continue_on_fail

boolean

Should execution of further actions continue or throw an error if this action fails. Default: true

See universal parameters.

Usage

The following JSON prints the page to a PDF in landscape with margins of 20px.

"actions": [
    {
        "type": "print",
        "page_size": "A4",
        "orientation": "landscape",
        "margin": 20
    }
]

Example Output

Last updated