Package com.itextpdf.layout.renderer
Class DocumentRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractRenderer
com.itextpdf.layout.renderer.RootRenderer
com.itextpdf.layout.renderer.DocumentRenderer
- All Implemented Interfaces:
-
IPropertyContainer,IRenderer
- Direct Known Subclasses:
-
ColumnDocumentRenderer
-
Field Summary
FieldsFields inherited from class com.itextpdf.layout.renderer.RootRenderer
currentArea, immediateFlush, waitingDrawingElementsFields inherited from class com.itextpdf.layout.renderer.AbstractRenderer
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties -
Constructor Summary
ConstructorsConstructorDescriptionDocumentRenderer(Document document) DocumentRenderer(Document document, boolean immediateFlush) -
Method Summary
Modifier and TypeMethodDescriptionprotected PageSizeaddNewPage(PageSize customPageSize) Adds new page with defined page size to PDF document.protected PageSizeensureDocumentHasNPages(int n, PageSize customPageSize) Ensures that PDF document has n pages.protected voidflushSingleRenderer(IRenderer resultRenderer) ForDocumentRenderer, this has a meaning of the renderer that will be used for relayout.Gets the resultant occupied area after the last call to theIRenderer.layout(LayoutContext)method.Get handler for target-counters.booleanIndicates if relayout is required for targetCounterHandler.protected LayoutAreaupdateCurrentArea(LayoutResult overflowResult) Methods inherited from class com.itextpdf.layout.renderer.RootRenderer
addChild, close, flush, flushWaitingDrawingElements, getCurrentArea, layout, shrinkCurrentAreaAndProcessRendererMethods inherited from class com.itextpdf.layout.renderer.AbstractRenderer
addAllProperties, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createXObject, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, endTransformationIfApplied, getBackgroundArea, getBorderAreaBBox, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getLastYLineRecursively, getMargins, getMinMaxWidth, getMinMaxWidth, getModelElement, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, hasAbsoluteUnitValue, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, move, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveResolvedDeclaredHeight, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidth
-
Field Details
-
document
-
wrappedContentPage
-
targetCounterHandler
-
-
Constructor Details
-
DocumentRenderer
-
DocumentRenderer
-
-
Method Details
-
getTargetCounterHandler
Get handler for target-counters.- Returns:
-
the
TargetCounterHandlerinstance
-
isRelayoutRequired
public boolean isRelayoutRequired()Indicates if relayout is required for targetCounterHandler.- Returns:
- true if relayout is required, false otherwise
-
getOccupiedArea
Description copied from class:AbstractRendererGets the resultant occupied area after the last call to theIRenderer.layout(LayoutContext)method.- Specified by:
-
getOccupiedAreain interfaceIRenderer - Overrides:
-
getOccupiedAreain classAbstractRenderer - Returns:
-
LayoutAreainstance
-
getNextRenderer
ForDocumentRenderer, this has a meaning of the renderer that will be used for relayout.- Returns:
- relayout renderer.
-
updateCurrentArea
- Specified by:
-
updateCurrentAreain classRootRenderer
-
flushSingleRenderer
- Specified by:
-
flushSingleRendererin classRootRenderer
-
addNewPage
Adds new page with defined page size to PDF document.- Parameters:
-
customPageSize- the size of new page, can be null - Returns:
- the page size of created page
-
ensureDocumentHasNPages
Ensures that PDF document has n pages. If document has fewer pages, adds new pages by callingaddNewPage(PageSize)method.- Parameters:
-
n- the expected number of pages if document -
customPageSize- the size of created pages, can be null - Returns:
- the page size of the last created page, or null if no page was created
-