Document Rendering Service

API

Base URL

  • Testing: /stg.documentrenderingservice.shipping.cimpress.io
  • Production: /documentrenderingservice.shipping.cimpress.io

Endpoint

   POST /api/v1/documents

Authentication

Uses Auth0 bearer token(JWT) for authentication. For more information, see the authentication documentation.

Headers

  • Accept (required): Media types which are acceptable for the response. Available values are application/pdf and text/csv.
  • Content-Encoding: The content encoding can be gzip or deflate to send compressed requests. Available values are gzip and deflate.

PDF Document Rendering

Usage

   Document Rendering Service (DRS) is a service which supports pdf, csv document generation. This document aims at details about the usage of service to generate pdf documents. In order to generate pdf using Document Rendering service, below are the set of inputs needed.

  1.  Template Type: It is the templating language in which the template is created. We are using Handlebars as templating language. It provides the power necessary to let you build semantic templates.

  2.  Template: Handlebar Template is a regular HTML with dynamic handler expression. The handler expression is in the form {{CONTENTKEY}}. The CONTENTKEY is provided in the template context. The template in the request must be base64 encoded.

    Example: The handler expression like {{headerTitle}} is used which is specified in the template context of the request.

  3. usage-template

  4.  Template Context: It is the data context used when interpolating the template.

  5. usage-template-context

  6.  PDF Rendering Options: It is to define the options for the pdf document. Following are the set of options we can specify.
    1. Orientation: specifies the orientation of the page. Options are portrait and landscape. By default, it is portrait.
    2. Paper size: specifies the format of page. Options are A4, A3, Legal, Letter, Tabloid.
    3. Footer: specifies footer for every page. By default, it displays center aligned page number. Footer can also be configured to display an image using option “div id=pageFooter”
    4. Header: specifies header for every page. If images are required in header choose the "div id=pageHeader" option in the template
    5. Border: specify border margins for pdf documents.

Features

  • Since the input template is an HMTL, it leverages all the powers and features of an HTML page rendering into a pdf document.
  • HTML with Cascading Style Sheets (CSS), and JavaScript forms a triad of capabilities for DRS.
  • With HTML constructs, images and other objects, such as interactive forms and dynamic contents may be embedded into the rendered PDF using template context. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items.


Samples

  1. Styling Tables

    Sample 1 - Document with static contents for a table.
    To render PDF with static data, simply create template as a regular html file with all contents and styling needed for the contents.

    JSON request:
                                    {
                                      "template": "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",
                                      "templateType": "handlebars"
                                    }
                                  


    Decoded template:
                                    
                                    
                                       
                                          
                                       
                                       
                                          
                                          

    API Documentation

    PDF Rendering documentation.

    Firstname Lastname Age
    Jill Smith 50
    Eve Jackson 94
    John Doe 80


    Response Pdf:
    resources/tables-sample1-response
    pdf-thumbnail response-1.pdf


    Sample 2 - Document with dynamic contents for a table.
    To render PDF document with dynamic data, create a template using handler expression. These handler expressions are interpolated from the template context of the request.

    JSON request:
                                    {
                                    	"template": "PCFET0NUWVBFIGh0bWw+DQo8c3R5bGU+DQp0aCB7DQogICAgICBib3JkZXItYm90dG9tOiAzcHggc29saWQgYmxhY2s7DQogICAgICBib3JkZXItdG9wOiAzcHggc29saWQgYmxhY2s7DQogICAgICBoZWlnaHQ6IDUwcHg7DQogICAgfQ0KPC9zdHlsZT4JDQo8aHRtbD4NCjxib2R5Pg0KPGRpdiBpZCA9ICJwYWdlSGVhZGVyIiBzdHlsZT0iaGVpZ2h0OjEwcHg7Ij4NCjxoMiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXIiPkRhaWx5IFJlcG9ydHM8L2gyPg0KPC9kaXY+DQo8aDM+QVBJIERvY3VtZW50YXRpb248L2gzPg0KPHA+UERGIFJlbmRlcmluZyBkb2N1bWVudGF0aW9uLjwvcD4NCnt7I3RhYmxlIHRhYmxlRGF0YX19e3svdGFibGV9fQ0KPC9ib2R5Pg0KPGZvb3Rlcj4NCiA8cD5Qb3N0ZWQgYnk6IENpbXByZXNzPC9wPg0KIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                    	"templateContext": {
                                    		"tableData": {
                                    			"border": "1",
                                    			"header": {
                                    				"style": "font-family:verdana;text-align:center;",
                                    				"columns": [
                                    					"First Name",
                                    					"Last Name",
                                    					"Eyecolor",
                                    					"City"
                                    				]
                                    			},
                                    			"body": {
                                    				"style": "font-family:verdana;text-align:center;",
                                    				"rows": [
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					]
                                    				]
                                    			}
                                    		}
                                    	},
                                    	"templateType": "handlebars"
                                    }
                                  

    Decoded template:
                                    
                                    
                                    
                                      
                                        
                                        

    API Documentation

    PDF Rendering documentation.

    {{#table tableData}}{{/table}}

    Response Pdf:
    resources/tables-sample2-response
    pdf-thumbnail response-2.pdf


    Sample 3 - Styling for column – colspan, color.
    To customize the table with colspan or color for particular column, below is the sample request.

    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQo8c3R5bGU+DQp0aCB7DQogICAgICBib3JkZXItYm90dG9tOiAzcHggc29saWQgYmxhY2s7DQogICAgICBib3JkZXItdG9wOiAzcHggc29saWQgYmxhY2s7DQogICAgICBoZWlnaHQ6IDUwcHg7DQogICAgfQ0KPC9zdHlsZT4JDQo8aHRtbD4NCjxib2R5Pg0KPGRpdiBpZCA9ICJwYWdlSGVhZGVyIiBzdHlsZT0iaGVpZ2h0OjEwcHg7Ij4NCjxoMiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXIiPkRhaWx5IFJlcG9ydHM8L2gyPg0KPC9kaXY+DQo8aDM+QVBJIERvY3VtZW50YXRpb248L2gzPg0KPHA+UERGIFJlbmRlcmluZyBkb2N1bWVudGF0aW9uLjwvcD4NCnt7I3RhYmxlIHRhYmxlRGF0YX19e3svdGFibGV9fQ0KPC9ib2R5Pg0KPGZvb3Rlcj4NCiA8cD5Qb3N0ZWQgYnk6IENpbXByZXNzPC9wPg0KIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateContext":{
                                        "tableData":{
                                          "border":"1",
                                          "header":{
                                            "style":"font-family:verdana;text-align:center;",
                                            "columns":[
                                              "First Name",
                                              "Last Name",
                                              "Eyecolor",
                                              "City"
                                            ]
                                          },
                                          "body":{
                                            "style":"font-family:verdana;text-align:center;",
                                            "rows":[
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                {
                                                  "text":"Total",
                                                  "style":"color:red",
                                                  "colspan":2
                                                }
                                              ]
                                            ]
                                          }
                                        }
                                      },
                                      "templateType":"handlebars"
                                    }
                                  

    Decoded Template:
                                    
                                    
                                    
                                    
                                    
                                    

    API Documentation

    PDF Rendering documentation.

    {{#table tableData}}{{/table}}

    Response Pdf:
    resources/tables-sample3-response


    pdf-thumbnail response-3.pdf


    Sample 4 - Styling for Cells.
    Customize cells styling using below properties in the request.

    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQo8c3R5bGU+DQp0aCB7DQogICAgICBib3JkZXItYm90dG9tOiAzcHggc29saWQgYmxhY2s7DQogICAgICBib3JkZXItdG9wOiAzcHggc29saWQgYmxhY2s7DQogICAgICBoZWlnaHQ6IDUwcHg7DQogICAgfQ0KPC9zdHlsZT4JDQo8aHRtbD4NCjxib2R5Pg0KPGRpdiBpZCA9ICJwYWdlSGVhZGVyIiBzdHlsZT0iaGVpZ2h0OjEwcHg7Ij4NCjxoMiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXIiPkRhaWx5IFJlcG9ydHM8L2gyPg0KPC9kaXY+DQo8aDM+QVBJIERvY3VtZW50YXRpb248L2gzPg0KPHA+UERGIFJlbmRlcmluZyBkb2N1bWVudGF0aW9uLjwvcD4NCnt7I3RhYmxlIHRhYmxlRGF0YX19e3svdGFibGV9fQ0KPC9ib2R5Pg0KPGZvb3Rlcj4NCiA8cD5Qb3N0ZWQgYnk6IENpbXByZXNzPC9wPg0KIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateContext":{
                                        "tableData":{
                                          "style":"width:100%",
                                          "header":{
                                            "columns":[
                                              "First Name",
                                              "Last Name",
                                              "Eyecolor",
                                              "City"
                                            ],
                                            "options":{
                                              "width":[
                                                "90%",
                                                "*",
                                                "5%"
                                              ]
                                            }
                                          },
                                          "body":{
                                            "style":"font-family:Verdana; color:green",
                                            "rows":[
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ]
                                            ]
                                          }
                                        }
                                      },
                                      "templateType":"handlebars"
                                    }
                                  

    Decoded Template:
                                    
                                      
                                      
                                      
                                      
                                      

    API Documentation

    PDF Rendering documentation.

    {{#table tableData}}{{/table}}

    Response Pdf:
    resources/tables-sample4-response
    pdf-thumbnail response-4.pdf


    Sample 5 - Styling for rows.
    Customize rows using styling properties as below.

    JSON request:
                                    {
                                    	"template": "PCFET0NUWVBFIGh0bWw+DQo8c3R5bGU+DQp0aCB7DQogICAgICBib3JkZXItYm90dG9tOiAzcHggc29saWQgYmxhY2s7DQogICAgICBib3JkZXItdG9wOiAzcHggc29saWQgYmxhY2s7DQogICAgICBoZWlnaHQ6IDUwcHg7DQogICAgfQ0KPC9zdHlsZT4JDQo8aHRtbD4NCjxib2R5Pg0KPGRpdiBpZCA9ICJwYWdlSGVhZGVyIiBzdHlsZT0iaGVpZ2h0OjEwcHg7Ij4NCjxoMiBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXIiPkRhaWx5IFJlcG9ydHM8L2gyPg0KPC9kaXY+DQo8aDM+QVBJIERvY3VtZW50YXRpb248L2gzPg0KPHA+UERGIFJlbmRlcmluZyBkb2N1bWVudGF0aW9uLjwvcD4NCnt7I3RhYmxlIHRhYmxlRGF0YX19e3svdGFibGV9fQ0KPC9ib2R5Pg0KPGZvb3Rlcj4NCiA8cD5Qb3N0ZWQgYnk6IENpbXByZXNzPC9wPg0KIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                    	"templateContext": {
                                    		"tableData": {
                                    			"border": "1",
                                    			"header": {
                                    				"style": "font-family:verdana;text-align:center;",
                                    				"columns": [
                                    					"First Name",
                                    					"Last Name",
                                    					"Eyecolor",
                                    					"City"
                                    				]
                                    			},
                                    			"body": {
                                    				"style": "font-family:verdana; color:green;",
                                    				"rows": [
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						{
                                    						"text":"Monument",
                                    						"style":"color:red"
                                    						}
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						{
                                    						"text":"Monument",
                                    						"style":"color:orange"
                                    						}
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					],
                                    					[
                                    						"Anthony",
                                    						"Conley",
                                    						"brown",
                                    						"Monument"
                                    					]
                                    				]
                                    			}
                                    		}
                                    	},
                                    	"templateType": "handlebars"
                                    }
                                  

    Response Pdf:
    resources/tables-sample5-response
    pdf-thumbnail response-5.pdf


  2. Styling Headers

    Sample 1 - Styling header with an image using json.
    Below is the example to render pdf using header with image. It uses custom property tag “div id=pageHeader” option in the template.

    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdHlsZT4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGggew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOiAzcHggc29saWQgYmxhY2s7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci10b3A6IDNweCBzb2xpZCBibGFjazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA1MHB4Ow0KICAgICAgICAgIC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DJya0hnZ3ZRcTllL1YzVjNqMDRFd1p2bFRVcUtpcmwxSEt6Zzd1WlB3dUVLYnpiZ3gwNnV2Y3hBN25IZVE3WDNmbWJCUzRFSVl1L043UzF0YW5hanRFdHduU0ZqVnQyeUM1d0pvdnpzYkVud0prd3Y1c0k4MWZBSFNFTWdPUlRaOWdnaS9PUnNhY2dhb2o5N3czZUFiRjA3ZHJkOTNyL1Q5d3h3Z0FqMHlmSWtmZk5sY2FiMFo0SS9EZkcwemRDVGkzNG13Q08wbjhsM0ZIQzRBNWd3YUxsSE10ZC95dXZKd0J2bkxQZmVJZHlWcXlscFcrc1ZyVi9IZHhSd2xqbytiQUlZOEV0V0lTeDRCWXN3bGh3Q3haaExMZ0ZpekFXM0lKRkdBdHV3U0tNQmJkZ0VjYUNXN0FJWThFdFdJU3g0QWFJL2dmcEdIbWhQVVhmRndBQUFBQkpSVTVFcmtKZ2dnPT0iPg0KCQkJCQkJCQkgIDwvaDI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyN0YWJsZSB0YWJsZURhdGF9fXt7L3RhYmxlfX0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9ib2R5Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8Zm9vdGVyPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHA+UG9zdGVkIGJ5OiBDaW1wcmVzczwvcD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb21lb25lQGV4YW1wbGUuY29tPC9hPjwvcD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9mb290ZXI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvaHRtbD4=",
                                      "templateContext":{
                                        "tableData":{
                                          "border":"1",
                                          "header":{
                                            "style":"font-family:verdana;text-align:center;",
                                            "columns":[
                                              "First Name",
                                              "Last Name",
                                              "Eyecolor",
                                              "City"
                                            ]
                                          },
                                          "body":{
                                            "style":"font-family:verdana;text-align:center;",
                                            "rows":[
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                "Anthony",
                                                "Conley",
                                                "brown",
                                                "Monument"
                                              ],
                                              [
                                                {
                                                  "text":"Total",
                                                  "style":"color:black",
                                                  "colspan":2
                                                }
                                              ]
                                            ]
                                          }
                                        }
                                      },
                                      "templateType":"handlebars"
                                    }
                                  

    Decoded template:
                                    
                                    
                                    
                                    
                                    
                                    {{#table tableData}}{{/table}}
                                    
                                    
                                    
                                  

    Response Pdf:
    resources/headers-sample1-response
    pdf-thumbnail response-1.pdf


    Sample 2 - Styling header using pdf rendering options.
    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KdGFibGUsIHRoLCB0ZCB7DQogICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQp9DQo8L3N0eWxlPg0KPC9oZWFkPg0KPGJvZHk+DQoNCjxoMz5BUEkgRG9jdW1lbnRhdGlvbjwvaDM+DQo8cD5QREYgUmVuZGVyaW5nIGRvY3VtZW50YXRpb24uPC9wPg0KPHRhYmxlIHN0eWxlPSJ3aWR0aDoxMDAlIj4NCiAgPHRyPg0KICAgIDx0aD5GaXJzdG5hbWU8L3RoPg0KICAgIDx0aD5MYXN0bmFtZTwvdGg+IA0KICAgIDx0aD5BZ2U8L3RoPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkppbGw8L3RkPg0KICAgIDx0ZD5TbWl0aDwvdGQ+DQogICAgPHRkPjUwPC90ZD4NCiAgPC90cj4NCiAgPHRyPg0KICAgIDx0ZD5FdmU8L3RkPg0KICAgIDx0ZD5KYWNrc29uPC90ZD4NCiAgICA8dGQ+OTQ8L3RkPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkpvaG48L3RkPg0KICAgIDx0ZD5Eb2U8L3RkPg0KICAgIDx0ZD44MDwvdGQ+DQogIDwvdHI+DQo8L3RhYmxlPg0KPC9ib2R5Pg0KIDxmb290ZXI+DQogIDxwPlBvc3RlZCBieTogQ2ltcHJlc3M8L3A+DQogIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateType":"handlebars",
                                      "pdfRenderingOptions":{
                                        "format":"A4",
                                        "header":{
                                          "height":"15mm",
                                          "contents":"
    Header Set in json{{page}}/{{pages}}
    " }, } }



    Response Pdf: resources/headers-sample1-response
    pdf-thumbnail response-2.pdf


  3. Styling Footer

    Sample 1 - Styling Footer in template
    JSON request:
                                    {
                                      "template": "PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KdGFibGUsIHRoLCB0ZCB7DQogICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQp9DQo8L3N0eWxlPg0KPC9oZWFkPg0KPGJvZHk+DQo8ZGl2IGlkID0gInBhZ2VIZWFkZXIiIHN0eWxlPSJoZWlnaHQ6MTBweDsiPg0KPGgyIHN0eWxlPSJ0ZXh0LWFsaWduOmNlbnRlciI+RGFpbHkgUmVwb3J0czwvaDI+DQo8L2Rpdj4NCjxoMz5BUEkgRG9jdW1lbnRhdGlvbjwvaDM+DQo8cD5QREYgUmVuZGVyaW5nIGRvY3VtZW50YXRpb24uPC9wPg0KPHRhYmxlIHN0eWxlPSJ3aWR0aDoxMDAlIj4NCiAgPHRyPg0KICAgIDx0aD5GaXJzdG5hbWU8L3RoPg0KICAgIDx0aD5MYXN0bmFtZTwvdGg+IA0KICAgIDx0aD5BZ2U8L3RoPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkppbGw8L3RkPg0KICAgIDx0ZD5TbWl0aDwvdGQ+DQogICAgPHRkPjUwPC90ZD4NCiAgPC90cj4NCiAgPHRyPg0KICAgIDx0ZD5FdmU8L3RkPg0KICAgIDx0ZD5KYWNrc29uPC90ZD4NCiAgICA8dGQ+OTQ8L3RkPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkpvaG48L3RkPg0KICAgIDx0ZD5Eb2U8L3RkPg0KICAgIDx0ZD44MDwvdGQ+DQogIDwvdHI+DQo8L3RhYmxlPg0KPC9ib2R5Pg0KIDxmb290ZXI+DQogIDxwPlBvc3RlZCBieTogQ2ltcHJlc3M8L3A+DQogIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateType": "handlebars"
                                    }
                                  


    Decoded template:
                                    
                                    
                                       
                                          
                                       
                                       
                                          
                                          

    API Documentation

    PDF Rendering documentation.

    Firstname Lastname Age
    Jill Smith 50
    Eve Jackson 94
    John Doe 80


    Response Pdf:
    resources/footer-sample1-response
    pdf-thumbnail response-1.pdf


    Sample 2 – Customizing footer using pdfrendering options.
    Below is the example to render pdf with footer with using pdfrendering options.

    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KdGFibGUsIHRoLCB0ZCB7DQogICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQp9DQo8L3N0eWxlPg0KPC9oZWFkPg0KPGJvZHk+DQoNCjxoMz5BUEkgRG9jdW1lbnRhdGlvbjwvaDM+DQo8cD5QREYgUmVuZGVyaW5nIGRvY3VtZW50YXRpb24uPC9wPg0KPHRhYmxlIHN0eWxlPSJ3aWR0aDoxMDAlIj4NCiAgPHRyPg0KICAgIDx0aD5GaXJzdG5hbWU8L3RoPg0KICAgIDx0aD5MYXN0bmFtZTwvdGg+IA0KICAgIDx0aD5BZ2U8L3RoPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkppbGw8L3RkPg0KICAgIDx0ZD5TbWl0aDwvdGQ+DQogICAgPHRkPjUwPC90ZD4NCiAgPC90cj4NCiAgPHRyPg0KICAgIDx0ZD5FdmU8L3RkPg0KICAgIDx0ZD5KYWNrc29uPC90ZD4NCiAgICA8dGQ+OTQ8L3RkPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkpvaG48L3RkPg0KICAgIDx0ZD5Eb2U8L3RkPg0KICAgIDx0ZD44MDwvdGQ+DQogIDwvdHI+DQo8L3RhYmxlPg0KPC9ib2R5Pg0KIDxmb290ZXI+DQogIDxwPlBvc3RlZCBieTogQ2ltcHJlc3M8L3A+DQogIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateType":"handlebars",
                                      "pdfRenderingOptions":{
                                        "format":"A4",
                                        "header":{
                                          "height":"15mm",
                                          "contents":"
    Header Set in json{{page}}/{{pages}}
    " }, "footer":{ "height":"15mm", "contents":"
    Footer Set in json{{page}}/{{pages}}
    " }, "border":{ "bottom":"2mm", "up":"10mm", "left":"10mm", "right":"10mm" } } }

    Decoded template:
                                    
                                    
                                    
                                    
                                    
                                    
    
                                    

    API Documentation

    PDF Rendering documentation.

    Firstname Lastname Age
    Jill Smith 50
    Eve Jackson 94
    John Doe 80


    Response Pdf:
    resources/footer-sample2-response
    pdf-thumbnail response-2.pdf


  4. Barcode Rendering

    To render barcode with customized barcode type, orientation and proper margins.

    JSON request:
                                    {
                                  		"template": "PGh0bWw+DQogIDxib2R5Pg0KICAgIDxkaXY+DQogICAgICA8Y2VudGVyPjxoND5UaGlzIGlzIGEgZG9jdW1lbnQgd2l0aCBiYXJjb2RlczwvaDQ+PC9jZW50ZXI+DQogICAgPC9kaXY+DQogICAgPGRpdj4NClRoaXMgaXMgQ29kZTEyOCBiYXJjb2RlPC9icj4NCiAgICAgIHt7I2JhcmNvZGUgYmFyY29kZURhdGExfX17ey9iYXJjb2RlfX0NCiAgICA8L2Rpdj4NCiAgICA8ZGl2Pg0KVGhpcyBpcyBDb2RlMzkgYmFyY29kZTwvYnI+DQogICAgICB7eyNiYXJjb2RlIGJhcmNvZGVEYXRhMn19e3svYmFyY29kZX19DQogICAgPC9kaXY+DQogICAgPGRpdj4NClRoaXMgaXMgRGF0YSBNYXRyaXggQmFyY29kZTwvYnI+DQogICAgICB7eyNiYXJjb2RlIGJhcmNvZGVEYXRhM319e3svYmFyY29kZX19DQogICAgPC9kaXY+DQogICAgPGRpdj4NClRoaXMgaXMgUGRmNDE3IEJhcmNvZGU8L2JyPg0KICAgICAge3sjYmFyY29kZSBiYXJjb2RlRGF0YTR9fXt7L2JhcmNvZGV9fQ0KICAgIDwvZGl2Pg0KICA8L2JvZHk+DQo8L2h0bWw+",
                                  		"templateContext": {
                                  	      "barcodeData1": {
                                  	        "content": "CP129087654",
                                  	        "barcodeType": "Code128",
                                  		    "barcodeWidth": 2,
                                  		    "humanReadable": true,
                                  		    "humanReadableFontSizeInMm": 0.5,
                                  		    "widthMillimeter": 100,
                                  		    "heightMillimeter": 40,
                                  		    "leftMarginMillimeter": 10
                                  	      },
                                  	      "barcodeData2": {
                                  	        "content": "CP129087654",
                                  	        "barcodeType": "Code39",
                                  		    "barcodeWidth": 2,
                                  		    "humanReadable": true,
                                  		    "humanReadableFontSizeInMm": 0.5,
                                  		    "widthMillimeter": 100,
                                  		    "heightMillimeter": 40,
                                  		    "leftMarginMillimeter": 10
                                  	      },
                                  	      	"barcodeData3": {
                                  	        "content": "CP129087654",
                                  	        "barcodeType": "DataMatrix",
    
                                  		    "widthMillimeter": 100,
                                  		    "heightMillimeter": 50,
                                  		    "leftMarginMillimeter": 10
                                  	      },
                                  	      	"barcodeData4": {
                                  	        "content": "CP129087654",
                                  	        "barcodeType": "Pdf417",
                                  		    "widthMillimeter": 100,
                                  		    "heightMillimeter": 50,
                                  		    "leftMarginMillimeter": 10
                                  	      }
                                  		},
                                  		"templateType": "handlebars"
                                  	}
                                  

    Decoded template:
                                    
                                      
                                        

    This is a document with barcodes

    This is Code128 barcode
    {{#barcode barcodeData1}}{{/barcode}}
    This is Code39 barcode
    {{#barcode barcodeData2}}{{/barcode}}
    This is Data Matrix Barcode
    {{#barcode barcodeData3}}{{/barcode}}
    This is Pdf417 Barcode
    {{#barcode barcodeData4}}{{/barcode}}

    Response Pdf:
    resources/barcoderendering-response
    pdf-thumbnail response-1.pdf


  5. Other PDF Rendering options – page format, page border, page orientation

    To render pdf with customized papersize, orientation and customized page border.

    JSON request:
                                    {
                                      "template":"PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KdGFibGUsIHRoLCB0ZCB7DQogICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQp9DQo8L3N0eWxlPg0KPC9oZWFkPg0KPGJvZHk+DQoNCjxoMz5BUEkgRG9jdW1lbnRhdGlvbjwvaDM+DQo8cD5QREYgUmVuZGVyaW5nIGRvY3VtZW50YXRpb24uPC9wPg0KPHRhYmxlIHN0eWxlPSJ3aWR0aDoxMDAlIj4NCiAgPHRyPg0KICAgIDx0aD5GaXJzdG5hbWU8L3RoPg0KICAgIDx0aD5MYXN0bmFtZTwvdGg+IA0KICAgIDx0aD5BZ2U8L3RoPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkppbGw8L3RkPg0KICAgIDx0ZD5TbWl0aDwvdGQ+DQogICAgPHRkPjUwPC90ZD4NCiAgPC90cj4NCiAgPHRyPg0KICAgIDx0ZD5FdmU8L3RkPg0KICAgIDx0ZD5KYWNrc29uPC90ZD4NCiAgICA8dGQ+OTQ8L3RkPg0KICA8L3RyPg0KICA8dHI+DQogICAgPHRkPkpvaG48L3RkPg0KICAgIDx0ZD5Eb2U8L3RkPg0KICAgIDx0ZD44MDwvdGQ+DQogIDwvdHI+DQo8L3RhYmxlPg0KPC9ib2R5Pg0KIDxmb290ZXI+DQogIDxwPlBvc3RlZCBieTogQ2ltcHJlc3M8L3A+DQogIDxwPkNvbnRhY3QgaW5mb3JtYXRpb246IDxhIGhyZWY9Im1haWx0bzpzb21lb25lQGV4YW1wbGUuY29tIj4NCiAgc29tZW9uZUBleGFtcGxlLmNvbTwvYT4uPC9wPg0KPC9mb290ZXI+IA0KPC9odG1sPg==",
                                      "templateType":"handlebars",
                                      "pdfRenderingOptions":{
                                        "format":"A4",
                                        "header":{
                                          "height":"15mm",
                                          "contents":"
    Header Set in json{{page}}/{{pages}}
    " }, "footer":{ "height":"15mm", "contents":"
    Footer Set in json{{page}}/{{pages}}
    " }, "border":{ "bottom":"2mm", "up":"10mm", "left":"10mm", "right":"10mm" } } }

    Decoded template:
                                    
                                    
                                    
                                    
                                    
                                    
    
                                    

    API Documentation

    PDF Rendering documentation.

    Firstname Lastname Age
    Jill Smith 50
    Eve Jackson 94
    John Doe 80

    Response Pdf:
    resources/pdfrendering-response
    pdf-thumbnail response-1.pdf


  6. Other HTML Capabilities

    PDF rendering example with all the capabilities of html which includes support for languages and other tags.

    JSON request:
                                    {
                                  		"template": "PGh0bWw+DQo8Ym9keT4NCiAgICA8ZGl2Pg0KICAgICAgPGNlbnRlcj48aDE+e3toZWFkZXJUaXRsZX19PC9oMT48L2NlbnRlcj4NCiAgICAgIDxjZW50ZXI+PGgzPnt7aGVhZGVyU3VidGl0bGV9fTwvaDM+PC9jZW50ZXI+DQogICAgPC9kaXY+DQogICAgPGRpdj4NCiAgICAgIDxjZW50ZXI+PGg0PlRoaXMgaXMgYW4gQWxsIEluIE9uZSBUZXN0PC9oND48L2NlbnRlcj4NCiAgICA8L2Rpdj4NCiAgICA8ZGl2Pg0KICAgICAge3sjdGFibGUgdGFibGVEYXRhfX17ey90YWJsZX19DQogICAgPC9kaXY+DQogICAgPGRpdj4NCiAgICAgIDxwIHN0eWxlPSJ0ZXh0LWFsaWduOnJpZ2h0Ij57e2phcGFuZXNlVGV4dH19PC9wPg0KICAgICAgPHAgc3R5bGU9InRleHQtYWxpZ246Y2VudGVyIj57e2hpbmRpVGV4dH19PC9wPg0KICAgIDwvZGl2Pg0KICA8L2JvZHk+DQo8L2h0bWw+",
                                  		"templateContext": {
                                  			"headerTitle": "Title / Header for the Document",
                                  			"japaneseText": "て餯 とずぴょ 䦦䰯ビェ榩䣊 軣ミェ䧺お",
                                  			"hindiText": "ہیلو آپ کیسے ہیں",
                                  			"tableData": {
                                  				"body": {
                                  					"rows": [
                                  						[
                                  							"This is an italic text",
                                  							"Normal Image"
                                  						],
                                  						[
                                  							"This is a bold text",
                                  							"",
                                  							"Standard Barcode"
                                  						],
                                  						[
                                  							"

    This is red colored text

    ", "", "QR Code" ], [ "

    This is text in Comic Sans MS Font

    ", "", "PDF-417 Barcode" ] ] } } }, "templateType": "handlebars", "pdfRenderingOptions": { "footer": { "contents": "
    Footer Set in json{{page}}/{{pages}}
    " } } }

    Decoded template:
                                    
                                      
                                          

    {{headerTitle}}

    {{headerSubtitle}}

    This is an All In One Test

    {{#table tableData}}{{/table}}

    {{japaneseText}}

    {{hindiText}}


    Response Pdf:
    resources/html-response
    pdf-thumbnail response-1.pdf