final int row,
final int col,
final PhysicalPageKey pageKey)
throws DocumentException
{
final PhysicalPageBox page = pageGrid.getPage(row, col);
final float width = (float) StrictGeomUtility.toExternalValue(page.getWidth());
final float height = (float) StrictGeomUtility.toExternalValue(page.getHeight());
final Rectangle pageSize = new Rectangle(width, height);
final float marginLeft = (float)
StrictGeomUtility.toExternalValue(page.getImageableX());
final float marginRight =
(float) StrictGeomUtility.toExternalValue
(page.getWidth()
- page.getImageableWidth()
- page.getImageableX());
final float marginTop = (float) StrictGeomUtility.toExternalValue
(page.getImageableY());
final float marginBottom =
(float) StrictGeomUtility.toExternalValue
(page.getHeight()
- page.getImageableHeight()
- page.getImageableY());
getDocument().setPageSize(pageSize);
getDocument().setMargins(marginLeft, marginRight, marginTop, marginBottom);
if (awaitOpenDocument)