when I am trying to render a pdf using suitescript...
# suitescript
a
when I am trying to render a pdf using suitescript 2.0. I get this output. code snippet: var renderer = render.create();                             renderer.setTemplateByScriptId({                                 scriptId: "CUSTTMPL_GATEPASS_TEMPLATE"                             });                             renderer.addCustomDataSource({                                 format: render.DataSource.OBJECT,                                 alias: "JSON",                                 data: {data: obj}                             });                                                          var invoicePdf = renderer.renderAsPdf();                                                           // write file                             context.response.writeFile({file: invoicePdf, isInline: true});
b
it kinda looks like a pdf that a browser didnt know how to render
whats the template
a
Well the funny thing is when I used the same code and the custom data object in other script it worked. I don't understand it.