if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
    public ComponentPrinter(JComponent component, String jobName) {      log = CSMART.createLogger(this.getClass().getName());	this.component = component;	job = PrinterJob.getPrinterJob();	if (job == null) {          if(log.isDebugEnabled()) {	    log.error("Couldn't find a printer!");          }	} else {	    java.awt.Toolkit tk = java.awt.Toolkit.getDefaultToolkit();	    scale = 72.0/tk.getScreenResolution();	    job.setJobName(jobName);	    format = job.pageDialog(job.defaultPage());	    Dimension size = component.getSize();	    double frameHeight = size.height * scale;	    double frameWidth = size.width * scale;	    double pageHeight = format.getImageableHeight();	    double pageWidth = format.getImageableWidth();	    pageDimension = new Dimension((int) pageWidth, (int) pageHeight);	    dimension = new Dimension();	    dimension.width = (int) (frameWidth/pageWidth);	    if (frameWidth%pageWidth != 0) dimension.width++;	    dimension.height = (int) (frameHeight/pageHeight);	    if (frameHeight%pageHeight != 0) dimension.height++;              if(log.isDebugEnabled()) {                log.debug("Page layout: " +                           dimension.width + "," + dimension.height);              }	    job.setPageable(this);	}    }