PDF Service Generator

PDF Service Generator

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

Header

KEY
TYPE
REQUIRED
authorization
your analysis token here
yes
Learn how to get your Analysis token.



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.

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






    • Related Articles

    • Notification Service

      Each time a push notification message is sent by an Action or Analysis function, it is counted as one Notification unit sent. The service limit defined inside each Profile determines the maximum number of Notifications that can be sent during a ...
    • SMS Service

      Each time an SMS message is successfully sent by an Action or Analysis function, it is counted as one SMS unit sent. The service limit defined inside each Profile determines the maximum number of SMS that can be sent during a one month period (based ...
    • File storage service

      You can use our Files module to store any type of files for reports, videos, logos, background images, and more. The File service is measured by the overall size of all files stored in your profiles. If any of your profile reaches the limit of size ...
    • E-mail Service

      Each time an Email is successfully sent by the Action or Analysis function, it is counted as one unit sent. This limit will define the maximum number of Emails that can be sent from that Profile during a one month period. If this limit is exceeded, ...
    • Data Input Service

      Each time a device sends data to TagoIO, the system will count 1 Data Input Transaction for each variable. These data input transactions are counted against the Profile where your devices are located. You need to estimate the maximum number of ...