Class PageMarginContent

java.lang.Object
com.itextpdf.layout.properties.margins.AbstractPageContent
com.itextpdf.layout.properties.margins.PageMarginContent

public class PageMarginContent extends AbstractPageContent
Class to store information about page margin content represented by IElement linked to MarginBoxName.
  • Constructor Details

    • PageMarginContent

      public PageMarginContent (MarginBoxName marginBoxName, IElement marginContent)
      Creates new PageMarginContent instance.
      Parameters:
      marginBoxName - MarginBoxName specifying margin name based on its location on the page
      marginContent - IElement layout element with margin content
    • PageMarginContent

      public PageMarginContent (MarginBoxName marginBoxName, float marginInPoints)
      Creates new PageMarginContent instance.

      The margin will have the specified size in points.

      Parameters:
      marginBoxName - MarginBoxName specifying margin name based on its location on the page
      marginInPoints - float specifying the margin in points
    • PageMarginContent

      public PageMarginContent (PageMarginContent other)
      Creates new PageMarginContent instance by copying existing one.
      Parameters:
      other - PageMarginContent instance to copy
  • Method Details

    • getMarginBoxName

      public MarginBoxName getMarginBoxName()
      Gets the page margin box name MarginBoxName which is based on its location on the page.
      Returns:
      the margin box name
    • equals

      public boolean equals (Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object