This error occurs if there is an attempt to change the printer name during printing.
Action
Change your application code to ensure that the set printer call (using the setPrinter method of the Printer class) is made prior to the first print frame being executed.