I have a senario where i need to create a Template for email in JSreport and show it in my angular app. the user can modify the report content and when they click sent button The edited content should be the body of the email. IS this possible with JSReport ?
I use .Net as server side.
Karthik22296
@Karthik22296
Posts made by Karthik22296
-
Email Template Using JSreport
-
Error while executing pdf-utils operations. Cannot read properties of undefined (reading '2')
when i try to render a report following error occurs. Can you help me understand the reason for this issue.
Error while executing pdf-utils operations. Cannot read properties of undefined (reading '2')
Error: Error while executing pdf-utils operations. Cannot read properties of undefined (reading '2')
at module.exports (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\shared\createError.js:10:13)
at WorkerReporter.createError (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\shared\reporter.js:47:12)
at AsyncFunction.<anonymous> (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\worker.js:191:22)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ListenerCollection.fire (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\shared\listenerCollection.js:157:21)
at async afterRender (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\worker\render\render.js:104:5)
at async WorkerReporter._render (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\worker\render\render.js:152:7)
at async F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\worker\reporter.js:177:19
at async Domain.<anonymous> (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\advanced-workers\lib\workerHandler.js:141:19)
caused by: TypeError: Cannot read properties of undefined (reading '2')
at new EmbeddedPdf (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\utils\EmbeddedPage.js:13:26)
at Object.module.exports.mergePages (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\utils\mergePdfs.js:126:18)
at Object.merge (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\utils\pdfManipulator.js:52:41)
at module.exports (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\pdfProcessing.js:118:25)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-pdf-utils\lib\worker.js:176:21)
at async ListenerCollection.fire (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\shared\listenerCollection.js:157:21)
at async afterRender (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\worker\render\render.js:104:5)
at async WorkerReporter._render (F:\CodeFrezz\April2022_Code_Freeze\jsReport\node_modules@jsreport\jsreport-core\lib\worker\render\render.js:152:7) -
RE: waiting for Page.printToPDF failed: timeout 30000ms exceeded
The Report version is 3.1.1
Config File:
{"allowLocalFilesAccess": true, "store": { "provider": "fs" }, "blobStorage": { "provider": "fs" }, "templatingEngines": { "timeout": 1200000 }, "chrome": { "timeout": 1200000 }, "reportTimeout": 1200000, "workers":{ "numberOfWorkers":6 }, "extensions": { "authentication" : { "cookieSession": { "secret": "<your strong secret>" }, "admin": { "username" : "admin", "password": "password" }, "enabled": false }, "sample-template": { "createSamples": true }, "scripts": { "timeout": 1200000 }, "express": { "inputRequestLimit": "200mb", "renderTimeout": 1200000 }, "fs-store": { "syncModifications": false } }
}
Log:
info
+0
Starting rendering request 42 (user: null)
info
+0
Rendering template { name: Active Case Basic Roster, recipe: chrome-pdf, engine: handlebars, preview: false }
debug
+4
Inline data specified.
debug
+1
Base url not specified, skipping its injection.
debug
+14
Replaced assets ["style.css"]
debug
+0
Rendering engine handlebars
debug
+1463
Executing recipe chrome-pdf
debug
+15
Converting with chrome HeadlessChrome/93.0.4577.0 using chrome-pool strategy
debug
+45
Page request: GET (document) file:///tmp/jsreport/autocleanup/82a82a00-f371-4892-8968-c2cd4d07a673-chrome-pdf.html
debug
+10306
Page request finished: GET (document) file:///tmp/jsreport/autocleanup/82a82a00-f371-4892-8968-c2cd4d07a673-chrome-pdf.html
debug
+541
Running chrome with params {"printBackground":true,"marginTop":"3.4cm","marginBottom":"1.3cm","landscape":true,"displayHeaderFooter":false,"margin":{"top":"3.4cm","bottom":"1.3cm"}}
error
+30001
Error when processing render request 42 waiting for Page.printToPDF failed: timeout 30000ms exceeded TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded
at Object.waitWithTimeout (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js:224:26)
at Page.createPDFStream (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2045:49)
at Page.pdf (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2057:37)
at /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:336:27
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:377:22
error
+1
Rendering request 42 finished with error in 42391 ms -
waiting for Page.printToPDF failed: timeout 30000ms exceeded
I have set my report time out as 1200000. Still, sometimes the following error arises.
Can you explain this and give me a solution if possible?waiting for Page.printToPDF failed: timeout 30000ms exceeded
TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded
at Object.waitWithTimeout (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js:224:26)
at Page.createPDFStream (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2045:49)
at Page.pdf (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2057:37)
at /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:336:27
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:377:22 -
RE: Time to print report/ Report Progress
I tried paralization by dividing the data into multiple chunks and sending those as multiple requests to the report.
when I do that this issue arrives.! Can you help me to find the issue and solution
Page crashed!
Error: Page crashed!
at Page._onTargetCrashed (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:324:28)
at /var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:162:57
at /var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:62
at Array.map (<anonymous>)
at Object.emit (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:43)
at CDPSession.emit (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/EventEmitter.js:72:22)
at CDPSession._onMessage (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:234:18)
at Connection._onMessage (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:111:25)
at WebSocket.<anonymous> (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:13:32)
at WebSocket.onMessage (/var/www/html/jsreport-dev/node_modules/ws/lib/event-target.js:132:16) -
Time to print report/ Report Progress
I have a scenario where we print reports of 3000pages or more, Since we know it takes time to render it, Is there a way to calculate the time it takes to render the report and show it to the client or show some percentage of the progress bar for the rendering done?
-
Rendering report with image sometimes takes to long
I have a report which shows single or multiple person photos in it, the problem is that I pass the image URL in <img> tag some time the server the image is stored on is down and the report takes time waiting to access the server, is there any timeout for solving this issue in configurations?
-
RE: Report generation takes too much time .
Sure.In the Data[ ] list "INC[ ]" array has a list of 40000 indexes.
-
RE: Report generation takes too much time .
just multiply the contents in the "data:[ ]"
-
Report generation takes too much time .
Hi,
My report takes more than 1 hour to generate pdf. Further, I am checking 1 year of data only. Normally user requirement is to download more than 3 years of data. So far I attached my workspace below and kindly tell me how to improve performance and download it within 4 minutes.playground link.
https://playground.jsreport.net/w/Karthik22296/Tqbb0VFuThe data itself is 18mb.
when I ran with the original data this issue came up.
Timeout Error: pdf generation not completed after 3600000ms
Error: Timeout Error: pdf generation not completed after 3600000ms at Timeout. (E:\Karthikeyan\V2\jsReport\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7)+0 Starting rendering request 15 (user: null)
+207 Rendering template { name: Booking - Booking Log, recipe: chrome-pdf, engine: handlebars, preview: false }
+339 Inline data specified.
+340 Resources not defined for this template.
+341 Base url not specified, skipping its injection.
+393 Replaced assets ["style.css"]
+409 Replaced assets ["/assets/County Logo's/denver.jpg","/assets/County Logo's/orange.png","/assets/County Logo's/sacramento.png","/assets/County Logo's/slo.png","/assets/County Logo's/logo-demo.png"]
+410 Rendering engine handlebars
+2692 Compiled template not found in the cache, compiling
+2763 Pdf utils adding group field, value: "COJL"
+19467 Executing recipe chrome-pdf
+21626 Starting child request to render pdf header
+21631 Starting rendering request 16 (user: null)
+21632 Rendering anonymous template { recipe: html, engine: handlebars }
+21632 Inline data specified.
+21633 Resources not defined for this template.
+21634 Base url not specified, skipping its injection.
+21729 Replaced assets ["/assets/County Logo's/denver.jpg","/assets/County Logo's/orange.png","/assets/County Logo's/sacramento.png","/assets/County Logo's/slo.png","/assets/County Logo's/logo-demo.png"]
+21731 Rendering engine handlebars
+24576 Compiled template not found in the cache, compiling
+24652 Executing recipe html
+24654 Skipping pdf utils operations because template is rendered with non-pdf recipe.
+24655 Skipping storing report.
+24664 Rendering request 16 finished in 3034 ms
+24708 Starting child request to render pdf footer
+24733 Starting rendering request 17 (user: null)
+24757 Rendering anonymous template { recipe: html, engine: handlebars }
+24758 Inline data specified.
+24759 Resources not defined for this template.
+24760 Base url not specified, skipping its injection.
+24786 Replaced assets ["/assets/County Logo's/denver.jpg","/assets/County Logo's/orange.png","/assets/County Logo's/sacramento.png","/assets/County Logo's/slo.png","/assets/County Logo's/logo-demo.png"]
+24819 Rendering engine handlebars
+27658 Compiled template not found in the cache, compiling
+27716 Executing recipe html
+27737 Skipping pdf utils operations because template is rendered with non-pdf recipe.
+27744 Skipping storing report.
+27776 Rendering request 17 finished in 3043 ms
+28645 Converting with chrome HeadlessChrome/76.0.3803.0 using dedicated-process strategy
+2562992 Running chrome with params {"printBackground":true,"marginTop":"3.4cm","displayHeaderFooter":true,"marginBottom":"1cm","headerTemplate":"\r\n \r\n","footerTemplate":"\r\n \r\n \r\n \r\n \r\n
\r\n Page of \r\n
\r\n \r\n","margin":{"top":"3.4cm","bottom":"1cm"}}