Hi, I'm using bootstrap css and the "full docker image", I managed to resolve this issue by adding the following to my page.
<!DOCTYPE html> <html lang="fr"> <head>
And <meta charset="UTF-8">
Thanks for your help
Hi, I'm using bootstrap css and the "full docker image", I managed to resolve this issue by adding the following to my page.
<!DOCTYPE html> <html lang="fr"> <head>
And <meta charset="UTF-8">
Thanks for your help
Hello
I'm trying to display french text with an accent example: Montréal
However, when generating PDF with the chrome-pdf recipe it's showing like so: Montréa`
Any idea on how to fix it?
PS: I'm using jsreport-browser-client-dist
client to generate PDF.
Thanks
Hello
I have an intermittent issue with rendering reports, I'm seeing the following exception when attempting to render a PDF., However, on subsequent attempts, it renders just fine.
I'm using the latest version of jsreport version 2.5.0 docker container + chrome engine.
2019-08-27T01:07:27.380Z - error: Error when processing render request Protocol error (Page.printToPDF): Target closed. Error: Protocol error (Page.printToPDF): Target closed.
at /app/node_modules/puppeteer/lib/Connection.js:183:56
at new Promise (<anonymous>)
at CDPSession.send (/app/node_modules/puppeteer/lib/Connection.js:182:12)
at Page.pdf (/app/node_modules/puppeteer/lib/Page.js:926:39)
at Page.<anonymous> (/app/node_modules/puppeteer/lib/helper.js:111:23)
at /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:164:27
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at async /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:200:22
2019-08-27T01:07:27.381Z - error: Error during processing request at http://35.182.32.163/api/report/3.DAILY%20TRANSACTION%20REPORT
Hello everyone,
I'm using jsreport via docker image, I'm trying to use an external npm package, how can I go about doing that?
npm i accounting
I have tried the following, but it says it can't find npm in the path.
sudo docker exec -it jsreport "npm i -g accounting"
Thanks
@jan_blaha I appreciate your quick response! thanks very much!
I have seen the option to schedule a job via jsreport studio, I haven't been able to find away to schedule them via API call, is this possible? if so an example would be most helpful.
Thanks
@jan_blaha updating the package fixed the problem, thanks very much
Hi @jan_blaha
Thanks for your quick response, sad to say this, but I have literally copied your example to my project, and I'm getting different exception.
W20180726-09:40:04.956(-4)? (STDERR) TypeError: Cannot read property 'body' of undefined
W20180726-09:40:04.957(-4)? (STDERR) at _callee$ (imports/startup/server/accounts/index.js:20:38)
W20180726-09:40:04.957(-4)? (STDERR) at tryCatch (/Users/user/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
W20180726-09:40:04.957(-4)? (STDERR) at Generator.invoke [as _invoke] (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
W20180726-09:40:04.958(-4)? (STDERR) at Generator.prototype.(anonymous function) [as next] (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
W20180726-09:40:04.958(-4)? (STDERR) at step (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
W20180726-09:40:04.958(-4)? (STDERR) at /Users/user/Projects/meteor/project/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
W20180726-09:40:04.958(-4)? (STDERR) at /Users/user/.meteor/packages/promise/.0.10.0.ak8m4i++os+web.browser+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
W20180726-09:40:04.958(-4)? (STDERR) /Users/user/Projects/meteor/project/node_modules/jsreport-client/lib/client.js:76
W20180726-09:40:04.959(-4)? (STDERR) cb(null, response)
W20180726-09:40:04.959(-4)? (STDERR) ^
W20180726-09:40:04.959(-4)? (STDERR)
W20180726-09:40:04.959(-4)? (STDERR) TypeError: cb is not a function
W20180726-09:40:04.959(-4)? (STDERR) at Request.<anonymous> (/Users/dck/Projects/meteor/project/node_modules/jsreport-client/lib/client.js:76:5)
W20180726-09:40:04.960(-4)? (STDERR) at emitOne (events.js:116:13)
W20180726-09:40:04.960(-4)? (STDERR) at Request.emit (events.js:211:7)
W20180726-09:40:04.960(-4)? (STDERR) at Request.onRequestResponse (/Users/user/Projects/meteor/project/node_modules/jsreport-client/node_modules/request/request.js:954:10)
W20180726-09:40:04.960(-4)? (STDERR) at emitOne (events.js:116:13)
W20180726-09:40:04.960(-4)? (STDERR) at ClientRequest.emit (events.js:211:7)
W20180726-09:40:04.960(-4)? (STDERR) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21)
W20180726-09:40:04.960(-4)? (STDERR) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)
W20180726-09:40:04.961(-4)? (STDERR) at Socket.socketOnData (_http_client.js:440:20)
W20180726-09:40:04.961(-4)? (STDERR) at emitOne (events.js:116:13)
My last question would be, how can I save buffer response to PDF file?
Thanks
Hey everyone,
Trying to generate PDF on server using jsreport-client to send request to another reporting server, following the example on https://jsreport.net/learn/nodejs-client
JS report version 2.1.1
const client = require("jsreport-client")("http://172.18.18.62");
client.render({
template: {
content: "hello {{someText}}",
recipe: "html",
engine: "handlebars"
},
data: { someText: "world!!" }
}).then((res) => {
response.body((buffer) => {
//prints hello world!!
console.log(buffer.toString());
});
});
However, this is what I'm seeing.
W20180725-15:49:53.920(-4)? (STDERR) TypeError: Cannot read property 'then' of undefined
W20180725-15:49:53.921(-4)? (STDERR) at index.js (imports/startup/server/accounts/index.js:8:1)
W20180725-15:49:53.921(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.921(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.921(-4)? (STDERR) at index.js (imports/startup/server/index.js:1:14)
W20180725-15:49:53.921(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.922(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.922(-4)? (STDERR) at main.js (server/main.js:1:14)
W20180725-15:49:53.922(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.922(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.923(-4)? (STDERR) at
Thanks @jan_blaha I have removed jsreport-contrib-mongodb
package and followed the guide you provided and I'm able to retrieve data from MongodDB.