Any advice please?
Posts made by Ch.K
-
RE: Jsreport on Amazon Linux
Yes i already followed the instructions in this tutirial.
Please let me know if there is anything i could try to fix it. -
Jsreport on Amazon Linux
Hello,
I successfully installed Jsreport on Amazon Linux. however when I try to generate a report I am getting the following errors:2021-09-06T08:57:03.900Z - error: Error when processing render request 1 Failed to launch chrome! /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatk-bridge-2.0.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatspi.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /usr/lib64/libxkbcommon.so.0: no version information available (required by /usr/lib64/libgdk-3.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: symbol lookup error: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_type_class_adjust_private_offset TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md Error: Failed to launch chrome! /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatk-bridge-2.0.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatspi.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: /usr/lib64/libxkbcommon.so.0: no version information available (required by /usr/lib64/libgdk-3.so.0) /home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: symbol lookup error: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_type_class_adjust_private_offset TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at onClose (/home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/lib/Launcher.js:348:14) at Interface.helper.addEventListener (/home/ec2-user/jsreport/jsreportapp/node_modules/puppeteer/lib/Launcher.js:337:50) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) at Interface.close (readline.js:368:8) at Socket.onend (readline.js:147:10) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9)
and here are my OS info:
NAME="Amazon Linux AMI" VERSION="2018.03" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2018.03" PRETTY_NAME="Amazon Linux AMI 2018.03"
-
RE: TOC table of content for script generated templates
Unfortunately no, I saw this demo before, but what I am trying to do is to dynamically generate templates by script using
jsrender
and at the end of the script append them usingpdf-utils
-
TOC table of content for script generated templates
Hello,
I need to know if it is possible to add TOC using pdf utils for my scenario.
I have a main template that loop on data and generate tens of templates after that.My setup is something similar to this admin playground
https://playground.jsreport.net/w/admin/UpVVJcAkIs it possible to add TOC for this type of documents?
Thanks
-
RE: jsreport-aws-s3-storage plugin callback once upload done
I will elaborate what I am trying to do and what I am expecting to get
I have a list of templates that i need to generate. Using thejsreport-aws-s3-storage
I was able to successfully upload the files to S3.1st Try
for(var i in templates){ var resp_pdf = await jsreport.render({ template: { name: templates[i].name recipe: 'chrome-pdf' }, data: templates[i].data, options: { "reports": { "async": true, "blobName": templates[i].name}, "reportName": templates[i].name } }) }
However I need to find a way to make a callback call once all files has been generated and uploaded to S3.
For that reason I tried first to put the above code at
beforeRender
of the main template and I was expecting that doing the callback fromafterRender
will take place only once all all files are on S3.await axios.get(CALLBACK_URL...
But somehow, I was getting the response sooner, before all files has been sent to S3.
2nd Try
I tried to count the generated files and then fire the CALLBACK as followingtoRender = 100; for(var i in templates){ var resp_pdf = await jsreport.render({ ... }) if(resp_pdf) rendered++; if(rendered==toRender){ // CALLBACK } }
Using this setup I noticed that the callback was fired as soon as all PDF files has been generated regardless if all of them has finished upload to s3 or not.
I am open for suggestions, Is there a better way to fire callback once all files has been uploaded ?
Thanks
-
jsreport-aws-s3-storage plugin callback once upload done
Hello,
I am trying to upload the pdf rendered files to an aws S3 using the jsreport-aws-s3-storage
My setup could be described as following:
- mainTemplate is an empty template used to populate the list of reports to be generated and then
- within mainTemplate @afterRender, we call new templates using jsreport.render({ ...})
we are using jsreport-aws-s3-storage plugin to store the generated output on aws server.
I need to be able to detect once the pdf files has been uploaded successfully to aws.
Thanks