A new printer setup causes an "Object reference not set to an instance of an object" error.
The print server is a Fuji-Xerox Fiery SP4000 PS v1.0. Previous to using this print server, my application worked fine.
My application sends documents to the printer, alternating between two trays (different paper media). When printing the documents, the user prints test page from each tray. The PrinterSettings from each printer dialog are then used for the main documents being printed.
The error message above occurs when the second document is printed, when the docLabel.Print() statement is executed. docLabel is the PrintDocument.
The error cannot be trapped in the docLabel_PrintPage routine, so I am guessing that the problem occurs in the line:
Private Sub docLabel_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles docLabel.PrintPage
Would either of the variables "sender" or "e" be Nothing?
What can be done?