rowIndex = pageIndex / pagesPerRow;
columnIndex = pageIndex - rowIndex * pagesPerRow;
}
Graphics2D g2D = (Graphics2D)g.create();
g2D.clip(new Rectangle2D.Double(imageableX, imageableY, imageableWidth, imageableHeight));
// Change coordinates system to paper imageable origin
g2D.translate(imageableX - columnIndex * imageableWidth, imageableY - rowIndex * imageableHeight);
g2D.scale(printScale, printScale);
float extraMargin = getStrokeWidthExtraMargin(printedItems);
g2D.translate(-printedItemBounds.getMinX() + extraMargin,