RE: Any solution for this Error?
var xmlTemplateFile = file.load(‘Templates/PDF Templates/template.xml’);
var renderer = render.create();
renderer.templateContent = xmlTemplateFile.getContents();
var recI = record.load({
type: ‘customrecord_emp_data_pr_process’,
id: 1609
});
var paySlip = renderer.addRecord({
templateName: ‘record’,
record: recI
});
var paySlipPdf = renderer.renderAsPdf();
Depends on the template, and the data you are working with, but the answer is that the xml you are generating contains predefined entities that must be replaced.
You may want to do the replacement in code, but freemarker has 2 ways to do the replacement for you: output format and escape.