We sometimes run big printing batches (atm a batch of 4000+ documents) after a number of prints, like maybe 1000-2000? We get the following error:
System.DivideByZeroException: Attempted to divide by zero.
at System.Drawing.Printing.PageSettings.get_HardMarginX()
at Aspose.Words.Rendering.AsposeWordsPrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Aspose.Words.Document.Print(PrinterSettings printerSettings, String documentName)
at Aspose.Words.Document.Print(PrinterSettings printerSettings)
at Aspose.Words.Document.Print(String printerName)
This error then keeps on repeating itself while the program is running, if i restart the printer the same documents print fine… Sadly it means i have to keep an eye on the printing software and restart it every now and then.
Untill i get the same error again after X printers (usually a high number, like 1000+) and then it will keep throwing the error on every .Print() call untill the software is restarted.