this(layoutProcess, true);
}
protected void validateOutput() throws NormalizationException
{
final LogicalPageBox logicalPageBox = getLogicalPageBox();
if (validateModelStep.isLayoutable(logicalPageBox) == false)
{
// final RenderNode nodeById = logicalPageBox.findNodeById(validateModelStep.getLayoutFailureNodeId());
// Log.debug ("Validation impossible: Reason-id: " +
// validateModelStep.getLayoutFailureResolution() +
// " on node " +
// nodeById);
setLayoutFailureReason(validateModelStep.getLayoutFailureResolution(),
validateModelStep.getLayoutFailureNodeId());
return;
}
tableValidationStep.validate(logicalPageBox);
updateTokensStep.compute
(logicalPageBox, getLayoutProcess(), getPageContext());
staticPropertiesStep.compute(logicalPageBox);
marginsStep.compute(logicalPageBox);
paragraphLinebreakStep.compute(logicalPageBox);
icmMetricsStep.compute(logicalPageBox);
boolean repeat = true;
while (repeat)
{
tableICMMetricsStep.compute(logicalPageBox);
minorAxisLayoutStep.compute(logicalPageBox);
majorAxisLayoutStep.compute(logicalPageBox);
tableRowHeightStep.compute(logicalPageBox);
breakabilityStep.compute(logicalPageBox);
if (paginationStep.performPagebreak(logicalPageBox) ||
logicalPageBox.isOpen() == false)
{
// Note: This logic might fail if the last commit causes more than one pagebreak.
// We may have to find a 'content-based' indicator when to shut-down the system.
// 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 OutputProcessor outputProcessor =
getLayoutProcess().getOutputProcessor();
final long nextOffset = paginationStep.getNextOffset();
final long pageOffset = logicalPageBox.getPageOffset();
final LogicalPageBox box = fillPhysicalPagesStep.compute
(logicalPageBox, pageOffset, nextOffset);
outputProcessor.processContent(box);
// Now fire the pagebreak. This goes through all layers and informs all
// components, that a pagebreak has been encountered and possibly a