Class HtmlCell

java.lang.Object
com.itextpdf.text.Rectangle
com.itextpdf.text.pdf.PdfPCell
com.itextpdf.tool.xml.html.pdfelement.HtmlCell
All Implemented Interfaces:
Element, IAccessibleElement

public class HtmlCell extends PdfPCell
HtmlCell is created to provide more parameters to better mimic the behavior of table cell in HTML.
  • Field Details

    • fixedWidth

      private float fixedWidth
    • values

      private TableStyleValues values
  • Constructor Details

    • HtmlCell

      public HtmlCell()
      Default constructor for a HTMLCell with no fixedWidth.
    • HtmlCell

      public HtmlCell(PdfPCell pdfPCell, boolean b)
      Constructor used for replacing a PdfPCell with a HtmlCell and setting its last in row boolean.
      Parameters:
      pdfPCell - PdfPCell.
      b - boolean sets the TableStyleValues.setLastInRow(boolean) method.
    • HtmlCell

      public HtmlCell(PdfPCell pdfPCell)
      Constructor used for replacing a PdfPCell with a HtmlCell.
      Parameters:
      pdfPCell - PdfPCell.
  • Method Details

    • setFixedWidth

      public void setFixedWidth(float fixedWidth)
      Sets the fixed width of the HtmlCell.
      Parameters:
      fixedWidth - the fixed cell width
    • getFixedWidth

      public float getFixedWidth()
      Gets the fixed width of the HtmlCell.
      Returns:
      the fixed Width value
    • getCellValues

      public TableStyleValues getCellValues()
      Gets the TableStyleValues of the HtmlCell.
      Returns:
      TableStyleValues
    • setCellValues

      public void setCellValues(TableStyleValues values)
      Sets the TableStyleValues of the HtmlCell.
      Parameters:
      values - the TableStyleValues