final boolean performOutput)
throws ContentProcessingException
{
final OutputProcessor outputProcessor = getOutputProcessor();
// next: perform pagination.
final LogicalPageBox pageBox = getPageBox();
// final long sizeBeforePagination = pageBox.getHeight();
//final LogicalPageBox clone = (LogicalPageBox) pageBox.deriveForAdvance(true);
final PaginationResult pageBreak = paginationStep.performPagebreak(pageBox);
if (pageBreak.isOverflow() || pageBox.isOpen() == false)
{
setLastStateKey(pageBreak.getLastVisibleState());
// final long sizeAfterPagination = pageBox.getHeight();
setPagebreaks(getPagebreaks() + 1);
pageBox.setAllVerticalBreaks(pageBreak.getAllBreaks());
flowCount += 1;
debugPrint(pageBox);
// A new page has been started. Recover the page-grid, then restart
// everything from scratch. (We have to recompute, as the pages may
// be different now, due to changed margins or page definitions)
final long nextOffset = pageBox.computePageEnd();
pageBox.setPageEnd(nextOffset);
final long pageOffset = pageBox.getPageOffset();
if (performOutput)
{
if (outputProcessor.isNeedAlignedPage())
{
final LogicalPageBox box = fillPhysicalPagesStep.compute(pageBox, pageOffset, nextOffset);
// DebugLog.log("Processing contents for Page " + flowCount + " Page-Offset: " + pageOffset + " -> " + nextOffset);
outputProcessor.processContent(box);
}
else