Hi guys,
Since jsReport v2 has recently been released, when will jsReport.Binary and and jsReport.Local be updated? Is there a way to update the jsReport version those NuGet packages are using to jsReport v2?
Thanks!
Hi guys,
Since jsReport v2 has recently been released, when will jsReport.Binary and and jsReport.Local be updated? Is there a way to update the jsReport version those NuGet packages are using to jsReport v2?
Thanks!
Yeah I am using .NET Binary and .NET Local NuGet packages. Thank you for clearing this up! I might try wkhtmltopdf then
Hi I am trying to integrate chrome-pdf to my .net core app. I used to use electron-pdf to generate pdfs and that works fine, but I want to add page numbers and repeating headers to my pdfs. I have installed chrome-pdf as per the installation instructions and I get this error:
2018-04-17T04:57:54.704Z - info: Using extension chrome-pdf
2018-04-17T04:57:54.707Z - error: Error when loading extension SyntaxError: Unexpected token (
SyntaxError: Unexpected token (
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at NativeModule.require (node.js:919:21)
at s (jsreportRuntime.js:1:551)
at jsreportRuntime.js:1:742
at jsreportRuntime.js:138690:16
at tryCatcher (jsreportRuntime.js:47291:23)
at Promise._settlePromiseFromHandler (jsreportRuntime.js:45313:31)
at Promise._settlePromise (jsreportRuntime.js:45370:18)
at Promise._settlePromiseCtx (jsreportRuntime.js:45407:10)
at Async._drainQueue (jsreportRuntime.js:42225:12)
at Async._drainQueues (jsreportRuntime.js:42230:10)
at Immediate.Async.drainQueues [as _onImmediate] (jsreportRuntime.js:42104:14)
at processImmediate [as _immediateCallback] (timers.js:396:17)
this is my current jsreport.config.json file:
{
"discover": true,
"logger": {
"file": { "transport": "file", "level": "verbose", "filename": "logs/log.txt" },
"error": { "transport": "file", "level": "error", "filename": "logs/error.txt" }
}
}
I have tried updating my Nodejs and my npm to the latest version and reinstalling chrome-pdf and that also didn't work. I can't figure out how to solve this issue.
Hi!,
I am trying to integrate jsreport into my .NET core 2.0 application as a Web API. At the moment, I am at the stage of trying to render a pdf with just an inline-template but I keep getting an exception when I try to use renderAsync(). I am hoping to try and return a memoryStream or a byte[]. Any help would be appreciated!
var rs = new LocalReporting().KillRunningJsReportProcesses().UseBinary(JsReportBinary.GetBinary())
.Configure(cfg => cfg.AllowLocalFilesAccess().BaseUrlAsWorkingDirectory())
.AsUtility()
.Create();
try{
var report = await rs.RenderAsync(new RenderRequest()
{
Template = new Template()
{
Recipe = Recipe.PhantomPdf,
Engine = Engine.Handlebars,
Content = @"Test"
}
});
var memoryStream = new MemoryStream();
await report.Content.CopyToAsync(memoryStream);
memoryStream.Seek(0, SeekOrigin.Begin);
return memoryStream.GetBuffer();
}
catch (Exception e)
{
throw new Exception(e.ToString());
}
Error:
jsreport.Local.JsReportBinaryException: Error rendering report: instance has been daemonized and initialized successfully (pid: 12400) rendering has finished with errors:Error: An error occurred while trying to execute the command: at onCriticalError ([eval]:29603:25) at [eval]:29558:13 at tryCatcher ([eval]:36038:23) at Promise._settlePromiseFromHandler ([eval]:34061:31) at Promise._settlePromise ([eval]:34118:18) at Promise._settlePromise0 ([eval]:34163:10) at Promise._settlePromises ([eval]:34238:18) at Async._drainQueue ([eval]:31008:16) at Async._drainQueues ([eval]:31018:10) at Immediate.Async.drainQueues [as _onImmediate] ([eval]:30892:14) at processImmediate [as _immediateCallback] (timers.js:396:17) {"originalError":{"response":{"statusCode":502,"headers":{"via":"1.1 TMG-PXYBK7P002","connection":"close","proxy-connection":"close","pragma":"no-cache","cache-control":"no-cache","content-type":"text/html","content-length":"4340 "},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"localhost:56184","port":"56184","hostname":"localhost","hash":null,"search":null,"query":null,"pathname":"/api/report","path":"/api/report","href":"http://localhost:56184/api/report"},"method":"POST","headers":{"Content-Type":"application/json","proxy-authorization":"Basic cWhcd2FsZHJvbm46bmVpbGZyMmc=","content-length":166}}}}}(Original) Error: Unknown error, status code 502 at [eval]:36648:21 at ConcatStream.<anonymous> ([eval]:42366:43) at emitNone (events.js:72:20) at ConcatStream.emit (events.js:166:7) at finishMaybe ([eval]:4229:14) at endWritable ([eval]:4239:3) at ConcatStream.Writable.end ([eval]:4209:41) at IncomingMessage.onend (_stream_readable.js:498:10) at IncomingMessage.g (events.js:260:16) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:464:9) at process._tickCallback (node.js:378:17) {"response":{"statusCode":502,"headers":{"via":"1.1 TMG-PXYBK7P002","connection":"close","proxy-connection":"close","pragma":"no-cache","cache-control":"no-cache","content-type":"text/html","content-length":"4340 "},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"localhost:56184","port":"56184","hostname":"localhost","hash":null,"search":null,"query":null,"pathname":"/api/report","path":"/api/report","href":"http://localhost:56184/api/report"},"method":"POST","headers":{"Content-Type":"application/json","proxy-authorization":"Basic cWhcd2FsZHJvbm46bmVpbGZyMmc=","content-length":166}}}}
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Iht.Api.Controllers.PdfController.<InvoiceAsync>d__2.MoveNext() in C:\git\IHT\Iht.Api\Controllers\PdfController.cs:line 64