Class HtmlDocumentRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractRenderer
com.itextpdf.layout.renderer.RootRenderer
com.itextpdf.layout.renderer.DocumentRenderer
com.itextpdf.html2pdf.attach.impl.layout.HtmlDocumentRenderer
- All Implemented Interfaces:
-
com.itextpdf.layout.IPropertyContainer
,com.itextpdf.layout.renderer.IRenderer
public class HtmlDocumentRenderer extends com.itextpdf.layout.renderer.DocumentRenderer
The DocumentRenderer class for HTML.
-
Field Summary
Fields inherited from class com.itextpdf.layout.renderer.DocumentRenderer
document, targetCounterHandler, wrappedContentPage
Fields inherited from class com.itextpdf.layout.renderer.RootRenderer
currentArea, immediateFlush, waitingDrawingElements
Fields inherited from class com.itextpdf.layout.renderer.AbstractRenderer
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties
-
Constructor Summary
ConstructorDescriptionHtmlDocumentRenderer
(com.itextpdf.layout.Document document, boolean immediateFlush) Instantiates a newHtmlDocumentRenderer
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(com.itextpdf.layout.renderer.IRenderer renderer) protected com.itextpdf.kernel.geom.PageSize
addNewPage
(com.itextpdf.kernel.geom.PageSize customPageSize) void
close()
void
flush()
protected void
flushSingleRenderer
(com.itextpdf.layout.renderer.IRenderer resultRenderer) com.itextpdf.layout.renderer.IRenderer
void
processPageRules
(com.itextpdf.styledxmlparser.node.INode rootNode, com.itextpdf.styledxmlparser.css.ICssResolver cssResolver, ProcessorContext context) Processes the page rules.void
Layouts waiting element.protected void
shrinkCurrentAreaAndProcessRenderer
(com.itextpdf.layout.renderer.IRenderer renderer, List resultRenderers, com.itextpdf.layout.layout.LayoutResult result) protected com.itextpdf.layout.layout.LayoutArea
updateCurrentArea
(com.itextpdf.layout.layout.LayoutResult overflowResult) Methods inherited from class com.itextpdf.layout.renderer.DocumentRenderer
ensureDocumentHasNPages, getOccupiedArea, getTargetCounterHandler, isRelayoutRequired
Methods inherited from class com.itextpdf.layout.renderer.RootRenderer
flushWaitingDrawingElements, getCurrentArea, layout
Methods 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, 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, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidth
-
Constructor Details
-
HtmlDocumentRenderer
public HtmlDocumentRenderer(com.itextpdf.layout.Document document, boolean immediateFlush) Instantiates a newHtmlDocumentRenderer
instance.- Parameters:
-
document
- an iTextDocument
instance -
immediateFlush
- the immediate flush indicator
-
-
Method Details
-
processPageRules
public void processPageRules(com.itextpdf.styledxmlparser.node.INode rootNode, com.itextpdf.styledxmlparser.css.ICssResolver cssResolver, ProcessorContext context) Processes the page rules.- Parameters:
-
rootNode
- the root node -
cssResolver
- the CSS resolver -
context
- the processor context
-
addChild
public void addChild(com.itextpdf.layout.renderer.IRenderer renderer) - Specified by:
-
addChild
in interfacecom.itextpdf.layout.renderer.IRenderer
- Overrides:
-
addChild
in classcom.itextpdf.layout.renderer.RootRenderer
-
close
public void close()- Overrides:
-
close
in classcom.itextpdf.layout.renderer.RootRenderer
-
getNextRenderer
public com.itextpdf.layout.renderer.IRenderer getNextRenderer()- Specified by:
-
getNextRenderer
in interfacecom.itextpdf.layout.renderer.IRenderer
- Overrides:
-
getNextRenderer
in classcom.itextpdf.layout.renderer.DocumentRenderer
-
flush
public void flush()- Overrides:
-
flush
in classcom.itextpdf.layout.renderer.RootRenderer
-
processWaitingElement
public void processWaitingElement()Layouts waiting element. -
updateCurrentArea
protected com.itextpdf.layout.layout.LayoutArea updateCurrentArea(com.itextpdf.layout.layout.LayoutResult overflowResult) - Overrides:
-
updateCurrentArea
in classcom.itextpdf.layout.renderer.DocumentRenderer
-
shrinkCurrentAreaAndProcessRenderer
protected void shrinkCurrentAreaAndProcessRenderer(com.itextpdf.layout.renderer.IRenderer renderer, List resultRenderers, com.itextpdf.layout.layout.LayoutResult result) - Overrides:
-
shrinkCurrentAreaAndProcessRenderer
in classcom.itextpdf.layout.renderer.RootRenderer
-
flushSingleRenderer
protected void flushSingleRenderer(com.itextpdf.layout.renderer.IRenderer resultRenderer) - Overrides:
-
flushSingleRenderer
in classcom.itextpdf.layout.renderer.DocumentRenderer
-
addNewPage
protected com.itextpdf.kernel.geom.PageSize addNewPage(com.itextpdf.kernel.geom.PageSize customPageSize) - Overrides:
-
addNewPage
in classcom.itextpdf.layout.renderer.DocumentRenderer
-