Updated to use the Printer class.