Hi There,
We are getting the below error randomly while printing the PDF document through windows service.
System.ArgumentNullException: Value cannot be null.
Parameter name: ptr
at System.Runtime.InteropServices.Marshal.StructureToPtr(Object structure, IntPtr ptr, Boolean fDeleteOld)
at System.Drawing.Printing.PageSettings.CopyToHdevmode(IntPtr hdevmode)
at System.Drawing.Printing.PrinterSettings.GetHdevmode()
at System.Drawing.Printing.PageSettings.get_Bounds()
at Aspose.Pdf.Facades.PdfViewer.PrintDocumentWithSettings(PageSettings pageSettings, PrinterSettings printerSettings)
We are using Aspose pdf library(.NET) 9.0.0
Can you please help us to fix this issue.
Thanks & Regards,
Shivarama shetty