Renderer targetRenderer = foUserAgent.getRendererFactory().createRenderer(
foUserAgent, mimicRenderer);
XMLRenderer xmlRenderer = new XMLRenderer(foUserAgent);
//Tell the XMLRenderer to mimic the target renderer
xmlRenderer.mimicRenderer(targetRenderer);
//Make sure the prepared XMLRenderer is used
foUserAgent.setRendererOverride(xmlRenderer);
} else if (MimeConstants.MIME_FOP_IF.equals(outputmode)
&& mimicRenderer != null) {