sectionType = CellMarker.SectionType.TYPE_HEADER;
if (isProcessWatermark())
{
startProcessing(logicalPage.getWatermarkArea());
}
final BlockRenderBox headerArea = logicalPage.getHeaderArea();
startProcessing(headerArea);
headerProcessed = true;
}
sectionType = CellMarker.SectionType.TYPE_NORMALFLOW;
processBoxChilds(logicalPage);
if (iterativeUpdate == false)
{
sectionType = CellMarker.SectionType.TYPE_REPEAT_FOOTER;
final BlockRenderBox repeatFooterBox = logicalPage.getRepeatFooterArea();
startProcessing(repeatFooterBox);
sectionType = CellMarker.SectionType.TYPE_FOOTER;
final BlockRenderBox pageFooterBox = logicalPage.getFooterArea();
startProcessing(pageFooterBox);
}
}
sectionType = CellMarker.SectionType.TYPE_INVALID;
finishBox(logicalPage);
//ModelPrinter.print(logicalPage);
}
else
{
// The page-header and footer area are not aligned/shifted within the logical pagebox.
// All areas have their own coordinate system starting at (0,0). We apply a manual shift here
// so that we dont have to modify the nodes (which invalidates the cache, and therefore is ugly)
//Log.debug ("Content Processing " + pageOffset + " -> " + pageEnd);
effectiveHeaderSize = 0;
pageOffset = logicalPage.getPageOffset();
pageEndPosition = (logicalPage.getPageEnd());
sectionType = CellMarker.SectionType.TYPE_INVALID;
if (startBox(logicalPage))
{
if (headerProcessed == false)
{
sectionType = CellMarker.SectionType.TYPE_HEADER;
pageOffset = 0;
contentOffset = 0;
effectiveHeaderSize = 0;
if (isProcessWatermark())
{
final BlockRenderBox watermarkArea = logicalPage.getWatermarkArea();
pageEndPosition = watermarkArea.getHeight();
startProcessing(watermarkArea);
}
final BlockRenderBox headerArea = logicalPage.getHeaderArea();
pageEndPosition = headerArea.getHeight();
startProcessing(headerArea);
contentOffset = headerArea.getHeight();
headerProcessed = true;
}
sectionType = CellMarker.SectionType.TYPE_NORMALFLOW;
pageOffset = logicalPage.getPageOffset();
pageEndPosition = logicalPage.getPageEnd();
effectiveHeaderSize = contentOffset;
processBoxChilds(logicalPage);
if (iterativeUpdate == false)
{
pageOffset = 0;
sectionType = CellMarker.SectionType.TYPE_REPEAT_FOOTER;
final BlockRenderBox repeatFooterArea = logicalPage.getRepeatFooterArea();
final long repeatFooterOffset = contentOffset + (logicalPage.getPageEnd() - logicalPage.getPageOffset());
final long repeatFooterPageEnd = repeatFooterOffset + repeatFooterArea.getHeight();
effectiveHeaderSize = repeatFooterOffset;
pageEndPosition = repeatFooterPageEnd;
startProcessing(repeatFooterArea);
final BlockRenderBox footerArea = logicalPage.getFooterArea();
sectionType = CellMarker.SectionType.TYPE_FOOTER;
final long footerPageEnd = repeatFooterPageEnd + footerArea.getHeight();
effectiveHeaderSize = repeatFooterPageEnd;
pageEndPosition = footerPageEnd;
startProcessing(footerArea);
}
}