final PdfContentByte directContent = writer.getDirectContent();
final Graphics2D graphics = new PdfGraphics2D(directContent, width, height, metaData);
final PdfLogicalPageDrawable logicalPageDrawable =
new PdfLogicalPageDrawable(logicalPage, metaData, writer, page, resourceManager, imageCache, version);
final PhysicalPageDrawable drawable = new PhysicalPageDrawable(logicalPageDrawable, page);
drawable.draw(graphics, new Rectangle2D.Double(0, 0, width, height));
graphics.dispose();
document.newPage();
}