Hi @jan_blaha , i tried that, and it works well.
Is it normal that for the first rendering request it takes almost the triple of time than the second request?
Thanks again!
Posts made by cooxel
-
RE: jsreport init and render problem, when to init jsreport using nodejs and createServer
-
jsreport init and render problem, when to init jsreport using nodejs and createServer
Hi, i'm using jsreport for a small task.
Having templates file to read, i first read all the files, store them in vars, then starting the rendering..then(fileContent => { jsreport.init().then(() => { jsreport.render({ template: { ... }
All of this is inside:
http .createServer((req, res) => {
So everytime a request comes to the node server it tries to re-initiate jsreport, giving me errors, of course.
I removed the piece where i init jsreport, leaving only the render.
It works now.
What i wanted to ask is, would be possible to initiate jsreport before the server, and then use jsreport.render() only when the server is called?I tried putting
const jsreport = require('jsreport')().init();
at the start, but then jsreport.render doesn't work.
Appreciate your help,
Thanks -
Delete last page in pdf
Hi,
I'm using jsreport with handlebars and phantom.
i have a table with rows, i alternate the rows background, looping on data. When the content is less than the page height, i need to fill the table with addictional rows.
I was thinking to add always a number of rows, let's say 28.
Then i just need to delete the last page.
Will it be possible to remove the last page from the report?Thanks