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.tago.io

Body Description

KEY
TYPE
REQUIRED
html
string
yes
options
json
no
Options field JSON Description
Key
Description
formatPaper format. If set, it takes priority over width or height options. Defaults to 'A4'. 
  • Letter: 8.5in x 11in
  • Legal: 8.5in x 14in
  • Tabloid: 11in x 17in
  • Ledger: 17in x 11in
  • A0: 33.1in x 46.8in
  • A1: 23.4in x 33.1in
  • A2: 16.54in x 23.4in
  • A3: 11.7in x 16.54in
  • A4: 8.27in x 11.7in
  • A5: 5.83in x 8.27in
  • A6: 4.13in x 5.83in

printBackgroundPrints background graphics. Defaults to false
displayHeaderFooterDisplays header and footer. Defaults to false
headerTemplateHTML template for the print header. Should be a valid HTML markup with the following classes used to inject printing values into them:
  • date formatted print date
  • title document title
  • url document location
  • pageNumber current page number
  • totalPages total pages in the document

footerTemplateHTML template for the print footer. Should use the same format as the headerTemplate
scaleScale of the webpage rendering. Defaults to 1. Scale amount must be between 0.1 and 2
landscapePaper orientation. Defaults to false
pageRangesPage ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages
marginObject: Paper margins, defaults to none. Example:
  top: '1.5cm',
  right: '1.5cm', 
  left: '1.5cm',
  bottom: '1.5cm'
}


Response data

The response will be a base64 string to build the PDF document.

Response description
statustrue if successful.
false if error.
resultbase64 string


Now, learn how to use the PDF service using TagoIO Analysis. In order to generate the PDF with this method, follow this documentation.

 Learn also how to:

  • SDK Node.js
  • Analysis

These will help you to build more amazing PDF documents with TagoIO.

Watch this video for an example of generating and sending PDF reports.