throw new FOPException("Flow '" + flow.getFlowName()
+ "' does not map to the region-body in page-master '"
+ currentSimplePageMaster.getMasterName() + "'", systemId, line, column);
}
}
Page newPage = this.currentSimplePageMaster.getPageMaster()
.makePage(areaTree);
newPage.setNumber(this.currentPageNumber);
String formattedPageNumber =
pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber);
newPage.setFormattedNumber(formattedPageNumber);
newPage.setPageSequence(this);
if (!isBlankPage) {
log.info("[" + currentPageNumber + "]");
BodyAreaContainer bodyArea = newPage.getBody();
bodyArea.setIDReferences(areaTree.getIDReferences());
if (currentPage != null) {
ArrayList foots = currentPage.getPendingFootnotes();
newPage.setPendingFootnotes(foots);
}
flow.layout(bodyArea);
} else {
log.info("[" + currentPageNumber + "] (blank)");
if (currentPage != null) {
ArrayList foots = currentPage.getPendingFootnotes();
if (foots != null) {
BodyAreaContainer bodyArea = newPage.getBody();
bodyArea.setIDReferences(areaTree.getIDReferences());
newPage.setPendingFootnotes(foots);
}
}
}
// because of markers, do after fo:flow (likely also
// justifiable because of spec)