nreco

NReco.PdfGenerator.WkHtmlToPdfException: exit code: -1073741521

安稳与你 提交于 2021-01-29 18:39:56
问题 I working on a pdf generator with NRec PdfGenerator and it works fine at the start when I working with local, once I package up and deploy to server it fail and show the error message Cannot generate PDF: (exit code: -1073741521) ---> NReco.PdfGenerator.WkHtmlToPdfException: (exit code: -1073741521) I not sure whats causing it and I believe is not related to the code itself, and I could find any related post or article that about the exit code shown. Is there anyway to fix this error? Any

Application End after saving PDF file in ASP.net

六眼飞鱼酱① 提交于 2020-04-16 04:08:48
问题 I created one function which get HTML data from session and save that as PDF for that I used NReco.PdfGenerator private static string savePdf() { if (HttpContext.Current.Session["ReservationPrintHtml"] != null) { StringBuilder objStringBuilder = ((StringBuilder)HttpContext.Current.Session["ReservationPrintHtml"]); string dir = HostingEnvironment.MapPath("~/Pdf"); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } string fileName = "PDF-" + DateTime.Now.ToString("yyyyMMdd

Application End after saving PDF file in ASP.net

走远了吗. 提交于 2020-04-16 04:08:12
问题 I created one function which get HTML data from session and save that as PDF for that I used NReco.PdfGenerator private static string savePdf() { if (HttpContext.Current.Session["ReservationPrintHtml"] != null) { StringBuilder objStringBuilder = ((StringBuilder)HttpContext.Current.Session["ReservationPrintHtml"]); string dir = HostingEnvironment.MapPath("~/Pdf"); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } string fileName = "PDF-" + DateTime.Now.ToString("yyyyMMdd

nreco pdf genreation error dot net

六眼飞鱼酱① 提交于 2019-12-24 10:48:32
问题 I am trying to generate pdf using nreco library and i am getting this exception while generating. (exit code: -1073741819) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: NReco.PdfGenerator.WkHtmlToPdfException: (exit code: -1073741819) Source Error: An unhandled exception was generated during the execution of the current web

Is there a way to set different headers on different pages using NReco.Pdf Generator C#?

雨燕双飞 提交于 2019-12-12 03:42:59
问题 We are having different templates for PDF Headers and Body respectively. Now we want different Headers on different pages. We are converting HTML to PDF using NReco and version is 1.1.12. 回答1: you can use some thing like this now u just need to set class to ur headers parent element like i did here to print p1-header add class p1, to print p2-header add class p2 to its container on that particular page <header class="p1"> // this p1-header will be visible only rest will hide <h1 class="p1

How to get multiple RecordSets from StoredProcedure with NReco.Data in Asp.NetCore

自闭症网瘾萝莉.ら 提交于 2019-12-12 03:39:12
问题 I use NReco.Data in my Asp.NetCore Application to make db-calls, because I don't want to use EF and DataTable isn't supported yet. Now I need to call a StoredProcedure and get Multiple RecordSets (or Dictionarylists). At the moment I called this: dbAdapter.Select($"STOREDNAME @{nameof(SQLPARAMETER)}", SQLPARAMETER).ToRecordSet() But the stored gives me more than 1 recordset, can anyone help me to get the others? 回答1: Currently NReco.Data.DbDataAdapter has no API for processing multiple result

.NET Threads are not separate?

 ̄綄美尐妖づ 提交于 2019-12-11 18:16:07
问题 I have a sub which gets the duration of a video file. Async Sub GetDuration(folder As String) Dim ffP As New FFProbe Dim vInfo As MediaInfo Dim totalSecs As Double = Await Task.Run(Function() vInfo = ffP.GetMediaInfo(filep) If vInfo.Duration.TotalSeconds < 10 Thread.Sleep(20000) End If Return vInfo.Duration.TotalSeconds End Function) When I run this on a short video (less than 10 seconds), it sleeps the application for 20 seconds, as expected. On another tab in the browser, however, I run it

How to get video duration from mp4,m3u8 or any other file

雨燕双飞 提交于 2019-12-10 12:19:04
问题 I found the NReco.VideoInfo library to be the best option and simpler 1] Find the NReco.VideoInfo library in NuGet Package Manager and import it in your project 2] After that import the namespace "using NReco.VideoInfo" 3] Add the below line of code into the method. var ffProbe = new FFProbe(); var videoInfo = ffProbe.GetMediaInfo(blob.Uri.AbsoluteUri); return videoInfo.Duration.TotalMilliseconds; here you can see some other option 回答1: Why don't you use the windows media player to solve this