}
private void cacheNextPageViewport(int index, boolean bIsBlank) {
try {
String pageNumberString = pageSeq.makeFormattedPageNumber(index);
SimplePageMaster spm = pageSeq.getNextSimplePageMaster(
index, (startPageOfPageSequence == index), bIsBlank);
Region body = spm.getRegion(FO_REGION_BODY);
if (!pageSeq.getMainFlow().getFlowName().equals(body.getRegionName())) {
// this is fine by the XSL Rec (fo:flow's flow-name can be mapped to
// any region), but we don't support it yet.
throw new FOPException("Flow '" + pageSeq.getMainFlow().getFlowName()
+ "' does not map to the region-body in page-master '"
+ spm.getMasterName() + "'. FOP presently "
+ "does not support this.");
}
PageViewport pv = new PageViewport(spm, pageNumberString, bIsBlank);
cachedPageViewports.add(pv);
} catch (FOPException e) {