BufferedImage buff = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g = (Graphics2D) buff.getGraphics();
Dimension dim = new Dimension(width, height);
renderer.layout(g, dim);
renderer.render(g);
StringBuffer sb = new StringBuffer();
getDiff(sb, renderer.getPanel().getRootBox(), "");
return sb.toString();
}