I do a record.load, get some from information from...
# advancedpdf
a
I do a record.load, get some from information from a sublist, load a free marker template and then I map over the list in the template.
Copy code
var renderer = render.create();
        var xmlStr = xmlTemplateFile.getContents();
        renderer.templateContent = xmlStr;
        renderer.addCustomDataSource({
            format: render.DataSource.OBJECT,
            alias: "JSON",
            data: { info: lines }
        });
        var pdf = renderer.renderAsPdf();
        response.writeFile({
            file: pdf
        });
When it doesn't have an ampersand, it works fine. But it gets an error when it has an ampersand. If I replace the
&
with
'&'
it doesn't error anymore, but I don't see the wanted
&
in my label