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

    Constructors
    Constructor
    Description
    HtmlDocumentRenderer(com.itextpdf.layout.Document document, boolean immediateFlush)
    Instantiates a new HtmlDocumentRenderer instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HtmlDocumentRenderer

      public HtmlDocumentRenderer (com.itextpdf.layout.Document document, boolean immediateFlush)
      Instantiates a new HtmlDocumentRenderer instance.
      Parameters:
      document - an iText Document 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 interface com.itextpdf.layout.renderer.IRenderer
      Overrides:
      addChild in class com.itextpdf.layout.renderer.RootRenderer
    • close

      public void close()
      Overrides:
      close in class com.itextpdf.layout.renderer.RootRenderer
    • getNextRenderer

      public com.itextpdf.layout.renderer.IRenderer getNextRenderer()
      Specified by:
      getNextRenderer in interface com.itextpdf.layout.renderer.IRenderer
      Overrides:
      getNextRenderer in class com.itextpdf.layout.renderer.DocumentRenderer
    • flush

      public void flush()
      Overrides:
      flush in class com.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 class com.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 class com.itextpdf.layout.renderer.RootRenderer
    • flushSingleRenderer

      protected void flushSingleRenderer (com.itextpdf.layout.renderer.IRenderer resultRenderer)
      Overrides:
      flushSingleRenderer in class com.itextpdf.layout.renderer.DocumentRenderer
    • addNewPage

      protected com.itextpdf.kernel.geom.PageSize addNewPage (com.itextpdf.kernel.geom.PageSize customPageSize)
      Overrides:
      addNewPage in class com.itextpdf.layout.renderer.DocumentRenderer