Hi,
I am trying to generate a sample PDF using electron pdf recipe.
however, i am getting this error.
Error summary : Recipe 'electron-pdf' not found . I have tried to look a related package in nuget , but i didnt find. could you please help me to find the right way to do this?
Full Error
Error rendering report: rendering has finished with errors:Error: An error occurred while trying to execute the command: at onCriticalError ([eval]:29603:25) 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":{"remoteStack":"Error: Recipe 'electron-pdf' not found\n at jsreportRuntime.js:138931:13\n at tryCatcher (jsreportRuntime.js:47291:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45313:31)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at PromiseArray._resolve (jsreportRuntime.js:45704:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45722:14)\n at Promise._settlePromise (jsreportRuntime.js:45375:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._settlePromise (jsreportRuntime.js:45383:21)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45255:14)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at jsreportRuntime.js:44730:21\n at nextTickCallbackWith0Args (node.js:442:9)\n at process._tickCallback (node.js:371:13)"}}(Original) Error: Error during rendering report: Recipe 'electron-pdf' not found at [eval]:36644:23 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 afterWrite ([eval]:4115:3) at nextTickCallbackWithManyArgs (node.js:486:18) at process._tickCallback (node.js:384:17) {"remoteStack":"Error: Recipe 'electron-pdf' not found\n at jsreportRuntime.js:138931:13\n at tryCatcher (jsreportRuntime.js:47291:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45313:31)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at PromiseArray._resolve (jsreportRuntime.js:45704:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45722:14)\n at Promise._settlePromise (jsreportRuntime.js:45375:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._settlePromise (jsreportRuntime.js:45383:21)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45255:14)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at jsreportRuntime.js:44730:21\n at nextTickCallbackWith0Args (node.js:442:9)\n at process._tickCallback (node.js:371:13)"}
Using Nuget package manager , i have installed the following packages
jsreport.Types.1.10.0
jsreport.Local.1.1.2
jsreport.Client.2.0.2
jsreport.Binary.1.10.0
jsreport.Shared.1.0.1.
Code Sample
var rs = new LocalReporting().UseBinary(JsReportBinary.GetBinary()).AsUtility().Create();
var report = await rs.RenderAsync(new RenderRequest
{
Template = new Template
{
Recipe = Recipe.ElectronPdf,
Engine = Engine.JsRender,
Content = "<html>yes</html>",
// Shortid = "test"
},
//Data = "<html>yes</html>"
}).ConfigureAwait(false);
var memoryStream = new MemoryStream();
report.Content.CopyTo(memoryStream);
byte[] myBynary = memoryStream.ToArray();