Test Your Template

Now that you have created your template, let’s test it with sample JSON data to ensure that all of the data renders properly.

To test the template:

  1. Click PDF & Screenshot under Convert in the SmartBrowz side menu bar to access the component. smartbrowz_tutorial_payslip_template_test_pdfnscreen_first

  2. Click Playground, and choose Template as the Input Type. smartbrowz_tutorial_payslip_template_test_pdfnscreen_template

  3. Select the custom template you have created from the Template drop-down. smartbrowz_tutorial_payslip_template_test_template_select

  4. Paste the following JSON snippet as the template data in the editor.

Sample JSON Data
{ "company": "Zylker Technologies", "employeeName": "Amelia Burrows", "employeeId": "ZT-789", "designation": "QA Analyst", "basicSalary": 10000, "allowances": 4500, "deductions": 1450, "totalEarnings": 14500, "netSalary": 13050, "paymentMethod": "Bank Transfer", "month": "September", "year": "2023" }
View more

Note: The sample JSON data above is only applicable for the template design that we have provided. If you have used your own custom design, you will need to provide a suitable JSON data as the input.
  1. Ensure Default Settings is set as the Template Settings. You can find out more on the functionality of Custom Settings from this help document. smartbrowz_tutorial_payslip_template_test_default_setting

  2. Click Generate. smartbrowz_tutorial_payslip_template_test_preview

A preview window will open, and you can view your custom template with the JSON data rendered. You can click Download to download the visual document to your local system.

Last Updated 2023-12-15 18:54:08 +0530 +0530