curl
command line tool. This example uses an external file - body.json
- which contains the API parameters as JSON-formatted data.curl
to make a request using form data from the command line:url
(required)landscape
margin_top
margin_right
margin_bottom
margin_left
page_size
scale
screen
header_template
footer_template
wait_network
wait_network_time
wait_network
. This option controls how many seconds of network inactivity is required before the PDF is captured.wait_network_time
value must be a number between 0 and 20.wait_network
is set but this option is not)wait_time
wait_time
value must be a number between 0 and 20.wait_css_selector
wait_time
option which gives you finer control over exactly when the PDF starts generating. You might find this useful if you have a single-page app or a page with a lot of dynamic content.wait_css_selector
to any valid CSS selector - for example:.container
body > .container
#main-content
file_name
[id].pdf
- for example acf9e87a-ab9f-4340-986b-647c7db28b64.pdf
./
to separate directory names - for example Reports/Customer-1234/2019-01-01.pdf
..pdf
extension to the file name isn't required, but is strongly recommended.[id].pdf
attachment
username
password
password
is set, you must also provide a username
.http_success
creation_failed
status) if the HTTP response from the URL is in the 400 or 500 range. For example, 401, 404 etc.height
and width
values within the page_size
parameter.curl
to set a custom page size:mm
) or inches (in
). If you don't specify a unit, inches are assumed. For example, these are all valid heights or widths:11.5in
8in
300mm
155mm
12
(interpreted as 12 inches)