Application Crashing with PrintManager v4.6

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF PrintManager for .NET (v4)  /  Application Crashing with PrintManager v4.6

DynamicPDF PrintManager for .NET (v4) Forum

Hi Team,

We are an existing customer of Dynamic PDF Print Manager.
Our system is currently on  version 2.0.2.27188, we recently upgraded to version  4.6.0.39522.
After upgrading we are getting the following  exception in the Event Viewer and application crashes abruptly.

"System.Runtime.InteropServices.COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Runtime.InteropServices.Marshal.FreeHGlobal(IntPtr hglobal)
   at ceTe.DynamicPDF.Printing.PrintJob.Dispose(Boolean disposing)
   at ceTe.DynamicPDF.Printing.PrintJob.Finalize()"

Please note this happens the second time we give the print request.

Please find the below piece of code we are using to call the Dynamic PDF PrintJob.

using (PrintJob printJob = new PrintJob(printerName, pdfFullFileName))
                            {
                                printJob.PrintOptions.Scaling = pageAutoPageScaling;
                                printJob.PrintOptions.Copies = numberOfCopies;
                                PrintJobPage page = null;
                                if (printJob.Pages != null)
                                    page = printJob.Pages[0];
                                if (page != null && page.InputPdfPage.Width > page.InputPdfPage.Height)
                                {
                                    printJob.PrintOptions.Orientation.Rotated = true;
                                }
                                printJob.Print();
                            }
The above piece of code runs in a thread.
The application crashes on printJob.Print().

Can you please let us know how to fix the above mentioned issue.
Posted by a ceTe Software moderator
Hello,

Thanks for posting the code sample and the DLL information. We have done testing on our end and are unable to recreate the issue so far. We are forwarding the error message and other information to our development team to look into it further. We will post an update once we have more  information from our development team.

Thanks,
ceTe Software Support Team
Posted by a ceTe Software moderator
Hello,

We have resolved this issue and an update has been released. Please download the latest version of DynamicPDF PrintManager (v4.08) which includes the fix from NuGet (Product ID: ceTe.DynamicPDF.Printing.NET) or from our website here.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 7:01 PM.