OK got it. Thanks.
enciphegraph
@enciphegraph
Posts made by enciphegraph
-
RE: Render report using a template generated by studio...
-
RE: Render report using a template generated by studio...
Thanks Jan. I was trying to get it working on ubuntu AWS ec2 without having to host the rest service, because my understanding was that it was only needed to access the template (since I'm calling jsreport.render(data) and not doing an http post). I'm still unsure of this, can you please clarify?
I have got it working however with the rest service.
-
Render report using a template generated by studio...
Hi,
I have template that I have created using the studio. Now, I just need to render reports using this template and pass it back to the frontend (angular). This is working perfectly fine.My question is, is it possible to render these, without starting the jsreport service using jsreport-core? Examples of jsreport-core state the following:
jsreport.init().then(() => { jsreport.render({ template: { content: '<h1>Hello {{foo}}</h1>', engine: 'handlebars', recipe: 'chrome-pdf' }, data: { foo: "world" } }).then((resp) => { // write report buffer to a file fs.writeFileSync('report.pdf', resp.content) }); }).catch((e) => { console.log(e) });
If I have to follow this approach will I have to hard code the template here? Or is there a way to point it to the already available template?
Thank you.