The Generate PDF endpoint converts HTML content into a PDF document. You can provide the content either as a publicly accessible URL or as raw HTML in the request body.
By default, the endpoint returns the generated PDF as a binary file. If you prefer a JSON response, you can include the jsonResponse field in your request.
Default: false
Returns JSON response instead of file stream.
Minimum: 60 seconds
Maximum: 86400 seconds (24 hours)
Use this to control temporary authorized access to files. After this duration, the URL automatically expires and can no longer be used to download the PDF. The value must be provided in seconds.
If you need to generate a new pre-signed URL for an existing document, use the Get Document endpoint.
Default: ledger
Custom PDF file width in pixels (px). It needs to be defined with the height field.
Custom PDF file height in pixels (px). It needs to be defined with the width field.
Default: portrait
Default: 900000 - (15 minutes)
Maximum wait time (in milliseconds) to render the HTML content. The default and maximum value is 900000 ms (15 minutes). Use this parameter to stop the rendering process earlier if needed.
Sets the CSS media type of the document.
Waits for specific CSS selector to be loaded. It will timeout in 30 seconds.
Waits and then clicks a specific CSS selector.
Provides advanced control for handling cookie banners, consent dialogs, pop-ups, and multi-step UI interactions before capturing the PDF.
When it is defined, the clickSelector field is ignored.
Waits until there are no more network connections in the document.
Adds a delay in milliseconds before processing the HTML content into a PDF. This can be useful when asynchronous content needs extra time to render. The maximum value you can set is 20 seconds (20000 in ms).
Waits for all images to finish loading before generating the PDF.
Default: 1
Sets the page scale factor when generating the PDF. Accepts values between 0.1 and 2.
Defines the page range to include in the PDF. Accepts formats like "1-5" or "1,3,5". If not specified, all pages are included.
Default: true
Includes background graphics in the PDF when set to true. If false, backgrounds are omitted and only main content is rendered.
Set your own user agent string to control how the page content is served.
Sets custom HTTP headers.
Page authentication allows you to render pages that are protected by HTTP authentication.
It is supported only when rendering a URL and cannot be used with HTML content.
See the authenticated pages guide for a full example.
Page viewport allows you to control the visible area of the page before it is rendered.
If enabled, the generated PDF will include interactive form fields (e.g., text inputs, checkboxes) that users can fill out directly in PDF viewers.
Supported HTML tags
For digital signature field we support the following custom HTML tag
Sets custom data to your document record.