DynamikPDFprintManger: The application runs into an exeption and stop running

DynamikPDFprintManger: The application runs into an exeption and stop running

Forum member · Sep 29, 2022
Hello , we have a print application who sometimes go into a exception when a print job is runnig. The application will be stopped and closed . 1. The function which we use to print a PDF stream. public bool Print(byte[] stream, string printerName) { bool Status = false; //Printjob auslösen using (PrintJob printJob = new PrintJob(printerName, new InputPdf(stream))) { //printJob.PrintOptions.PaperSize = printJob.Printer.PaperSizes.A4; printJob.PrintOptions.Orientation.Type = OrientationType.Auto; printJob.PrintOptions.Scaling = autoPageScaling; if (PaperSizeLetter) { //Papersize = letter (Divsion Greenwood) printJob.PrintOptions.PaperSize = printJob.Printer.PaperSizes.Letter; } if (Duplex) { //Print duplex ... printJob.PrintOptions.DuplexMode = DuplexMode.DuplexVertical; } printJob.Print(); Status = true; } We have tried to use the Dispose() method and so on, but nothing help. 2. Entry LogViewer Application: ReportGenerator.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at ceTe.DynamicPDF.Printing.Native.b(IntPtr, IntPtr) at ceTe.DynamicPDF.Printing.PrintJobPage.i() at ceTe.DynamicPDF.Printing.PrintJobPageList.a() at ceTe.DynamicPDF.Printing.PrintJob.Print() at Ehw.Controlling.PDFFunctions.PDFPrint.Print(System.String, System.String) at ReportGenerator.ReportManager.PrintReport(Byte[], ReportOrderInfo) at ReportGenerator.ReportManager.PPA_PRINT_RPT_Templates(ReportOrderInfo) at ReportGenerator.ReportManager+<>c__DisplayClass15_0.<StartPrintJobs_APP08>b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) at System.Threading.Tasks.Task.ExecuteEntry(Boolean) at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() ReportGenerator.exe 2.9.1.0 63352d62 ucrtbase.dll 10.0.17763.1490 51d4b57a c0000005 00060dae 1fa0 01d8d3cc39f50bef C:\APPS\ReportGenerator\Testversion\Runtime\ReportGenerator.exe C:\Windows\System32\ucrtbase.dll e5fd7480-d16b-4451-8c29-770a4d2831d8

Re: DynamikPDFprintManger: The application runs into an exeption and stop running

Support · Sep 29, 2022
Hi, AccessViolation is a generic error, and this could be related to permissions on the printer, the printer driver or printer on which you are trying to print. Please check the permissions and updating the printer driver or try a different driver and see if it helps. Also, if you are using an older version of DynamicPDF PrintManager, try updating to the latest version (v4.19). You can download the latest from NuGet (Package ID: ceTe.DynamicPDF.Printing.NET) or from our website here . Also refer to the documentation on referencing assembly and deployment here . If you continue facing an issue even after using the latest on your end, please send over the following information to [^a|mailto:support@dynamicpdf.com|opennewwindow|support@dynamicpdf.com^] so we can look into it further. 1. Simple console application which uses static data to recreate the error. 2. Source PDF to recreate the error. 3. Full error message along stack trace along with error code. 4. Exact version and build number of the DynamicPDF PrintManager DLL file used in your application. Yu can find this information by right clicking on the DLL file>>Properties>>Details tab>>product version. Take a screenshot of the Details tab and send it over to us. 5. Printer information: Name, printer driver version. provide a link to download specific printer driver. Thanks, ceTe Software Support Team