DocPrintJob printJob = createDocPrintJob();
//Set up a custom user agent so we can supply our own renderer instance
FOUserAgent userAgent = fopFactory.newFOUserAgent();
PageableRenderer renderer = new PageableRenderer();
renderer.setUserAgent(userAgent);
userAgent.setRendererOverride(renderer);
// Construct FOP with desired output format
Fop fop = fopFactory.newFop(userAgent);