Printer generation fixes.

Fixed the code responsible for generating the Printer code so
that the generated code will be correct Java code.