boolean paintAsBitmap = pclContext.paintAsBitmap();
if (!paintAsBitmap) {
ByteArrayOutputStream baout = new ByteArrayOutputStream();
PCLGenerator tempGen = new PCLGenerator(baout, gen.getMaximumBitmapResolution());
try {
GraphicContext ctx = (GraphicContext)pcl.getGraphicContext().clone();
AffineTransform prepareHPGL2 = new AffineTransform();
prepareHPGL2.scale(0.001, 0.001);
ctx.setTransform(prepareHPGL2);
PCLGraphics2D graphics = new PCLGraphics2D(tempGen);
graphics.setGraphicContext(ctx);
graphics.setClippingDisabled(pclContext.isClippingDisabled());
Rectangle2D area = new Rectangle2D.Double(0.0, 0.0, imw, imh);