Learn how to create PDF documents using the TagoIO service generator. Simply make an HTTP request to our PDF service, and the response will be a base64. The base64 response can be sent by email using Analysis or it may be saved in our Files.
POST https://pdf.middleware.tago.io
KEY | TYPE | REQUIRED |
---|---|---|
authorization | your analysis token here | yes |
Options field JSON Description | |
Key | Description |
format | Paper format. If set, it takes priority over width or height options. Defaults to 'A4'.
|
printBackground | Prints background graphics. Defaults to false |
displayHeaderFooter | Displays header and footer. Defaults to false |
headerTemplate | HTML template for the print header. Should be a valid HTML markup with the following classes used to inject printing values into them:
|
footerTemplate | HTML template for the print footer. Should use the same format as the headerTemplate |
scale | Scale of the webpage rendering. Defaults to 1 . Scale amount must be between 0.1 and 2 |
landscape | Paper orientation. Defaults to false |
pageRanges | Page ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages |
margin | Object: Paper margins, defaults to none. Example: { top: '1.5cm', right: '1.5cm', left: '1.5cm', bottom: '1.5cm' } |
The response will be a base64 string to build the PDF document.
Response description | |
status | true if successful. false if error. |
result | base64 string |
Now, learn how to use the PDF service using TagoIO Analysis. In order to generate the PDF with this method, follow this documentation.
These will help you to build more amazing PDF documents with TagoIO.