Hi, can someone tell me how can i use objects in a...
# general
a
Hi, can someone tell me how can i use objects in advanced/pdf template
j
Copy code
// RENDER VALUES INTO TEMPLATE
                    var myFile = render.create();
                    var templateForReceipt = 100;

                    myFile.setTemplateById(templateForReceipt);
                    myFile.addCustomDataSource({
                        format: render.DataSource.OBJECT,
                        alias: "receiptObj",
                        data: receiptObj
                    });
                    var fileObj = myFile.renderAsPdf();
                    fileObj.name = 'Receipt.pdf';
You can create an object, use the above mentioned code and refer to the object using the "alias" in the advanced pdf template.