Class PageMarginBoxCssApplier

java.lang.Object
com.itextpdf.html2pdf.css.apply.impl.PageMarginBoxCssApplier
All Implemented Interfaces:
ICssApplier

public class PageMarginBoxCssApplier extends Object implements ICssApplier
ICssApplier implementation for page margin box containers.
  • Constructor Details

    • PageMarginBoxCssApplier

      public PageMarginBoxCssApplier()
  • Method Details

    • parseBoxProps

      public static float[] parseBoxProps (Map<String,String> styles, float em, float rem, float[] defaultValues, com.itextpdf.kernel.geom.Rectangle containingBlock, String topPropName, String rightPropName, String bottomPropName, String leftPropName)
      Parses the page and margin boxes properties (like margins, paddings, etc).
      Parameters:
      styles - a Map containing the styles
      em - a measurement expressed in em
      rem - a measurement expressed in rem (root em)
      defaultValues - the default values
      containingBlock - the containing block
      topPropName - the top prop name
      rightPropName - the right prop name
      bottomPropName - the bottom prop name
      leftPropName - the left prop name
      Returns:
      an array with a top, right, bottom, and top float value
    • apply

      public void apply (ProcessorContext context, com.itextpdf.styledxmlparser.node.IStylesContainer stylesContainer, ITagWorker tagWorker)
      Description copied from interface: ICssApplier
      Applies styles to an element.
      Specified by:
      apply in interface ICssApplier
      Parameters:
      context - the processor context
      stylesContainer - the styles
      tagWorker - the tag worker for the element