Parameter | Required | Type | Default | Description |
---|
content | yes | string | | The HTML content. This can be either a URL to load from, a file upload (multipart/form-data) or an HTML content string |
format | no | string | PDF | Which format to output, available options are: PDF, PNG, JPG |
title | no | string | | The document title |
page-size | no | string | A4 | Set the document page size, can be one of: A0 - A9, B0 - B10, Comm10E, DLE or Letter |
page-width | no | integer | | Set the PDF page width explicitly (in mm) |
page-height | no | integer | | Set the PDF page height explicitly (in mm) |
margin | no | integer | 0 | The document margin (in mm) |
margin-left | no | integer | 0 | The document left margin (in mm) |
margin-right | no | integer | 0 | The document right margin (in mm) |
margin-top | no | integer | 0 | The document top margin (in mm) |
margin-bottom | no | integer | 0 | The document bottom margin (in mm) |
landscape | no | boolean | false | Set the document to landscape orientation |
zoom | no | float | 1 | Set the zoom factor when rendering the page (2.0 for double size, 0.5 for half size) |
grayscale | no | boolean | false | Render the final document in grayscale |
media-print | no | boolean | false | Use @media print CSS styles to render the document |
media-queries | no | boolean | false | Activate all @media queries before rendering. This can be useful if you wan't to render the mobile version of a responsive website |
forms | no | boolean | false | Generate real (fillable) PDF forms from HTML forms |
css | no | string | | Inject custom CSS into the HTML. e.g. 'body { background-color: red;}' |
render-delay | no | integer | 0 | Number of milliseconds to wait before rendering the page (can be useful for pages with animations etc) |
image-width | no | integer | 1024 | If rendering to an image format (PNG or JPG) use this image width (in pixels) |
image-height | no | integer | | If rendering to an image format (PNG or JPG) use this image height (in pixels). The default is automatic which dynamically sets the image height based on the content |
header-text-left | no | string | | Text to print to the left-hand side header of each page. e.g. 'My header - Page {page_number} of {total_pages}' |
header-text-center | no | string | | Text to print to the center header of each page |
header-text-right | no | string | | Text to print to the right-hand side header of each page |
header-size | no | integer | 9 | The height of your header (in mm) |
header-font | no | string | Courier | Set the header font. Fonts available: Times, Courier, Helvetica, Arial |
header-font-size | no | integer | 11 | Set the header font size (in pt) |
header-line | no | boolean | false | Draw a full page width horizontal line under your header |
footer-text-left | no | string | | Text to print to the left-hand side footer of each page. e.g. 'My footer - Page {page_number} of {total_pages}' |
footer-text-center | no | string | | Text to print to the center header of each page |
footer-text-right | no | string | | Text to print to the right-hand side header of each page |
footer-size | no | integer | 9 | The height of your footer (in mm) |
footer-font | no | string | Courier | Set the footer font. Fonts available: Times, Courier, Helvetica, Arial |
footer-font-size | no | integer | 11 | Set the footer font size (in pt) |
footer-line | no | boolean | false | Draw a full page width horizontal line above your footer |