final int x = area.crOriginX();
final int y = area.crOriginY();
final int w = area.crIpd();
final int h = area.crBpd();
final Graphic img = area.getGraphic();
if (img == null) {
getLogger().error("Error while loading image : area.getImage() "
+ "is null");
// correct integer roundoff
// graphics.drawRect(x / 1000, pageHeight - y / 1000,
// w / 1000, h / 1000);
addRect(x, y, w, h, true); // use helper function
final java.awt.Font f = this.graphics.getFont();
final java.awt.Font smallFont = new java.awt.Font(f.getFontName(),
f.getStyle(), 8);
this.graphics.setFont(smallFont);
// correct integer roundoff // aml/rlc
// graphics.drawString("area.getImage() is null", x / 1000,
// pageHeight - y / 1000);
this.graphics.drawString("area.getImage() is null",
Math.round(toPoints(x)),
this.pageHeight - Math.round(toPoints(y)));
this.graphics.setFont(f);
} else {
if (img instanceof SvgGraphic) {
final SvgGraphic svg = (SvgGraphic) img;
final Rectangle contentRect = new Rectangle(area.crOriginX(),
area.crOriginY(), area.crIpd(), area.crBpd());
renderSVGDocument(svg,
Renderer.convertMillipointRectangle(contentRect), null);
} else {
final String urlString = img.getUrl().toString();
try {
final URL url = URLFactory.createURL(urlString);
final ImageIcon icon = new ImageIcon(url);
final Image image = icon.getImage();