double scale = imageDim.getWidth() / UnitConv.mm2pt(imageDim.getWidth() * 0.025);
gen.writeText("SC0," + gen.formatDouble4(scale)
+ ",0,-" + gen.formatDouble4(scale) + ",2;");
gen.writeText("IR0,100,0,100;");
gen.writeText("PU;PA0,0;\n");
baout.writeTo(gen.getOutputStream()); //Buffer is written to output stream
gen.writeText("\n");
gen.enterPCLMode(false);
painted = true;
} catch (UnsupportedOperationException uoe) {