Class PdfPRow
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
A row in a PdfPTable. @author Paulo Soares (psoares@consiste.pt)
public class PdfPRow
- Inheritance
-
PdfPRow
- Inherited Members
Constructors
PdfPRow(PdfPCell[])
Constructs a new PdfPRow with the cells in the array that was passed as a parameter.
public PdfPRow(PdfPCell[] cells)
Parameters
cells
PdfPCell[]
PdfPRow(PdfPRow)
Makes a copy of an existing row.
public PdfPRow(PdfPRow row)
Parameters
row
PdfPRow
Fields
BOTTOM_LIMIT
the bottom limit (bottom right y)
public const float BOTTOM_LIMIT = -1.0737418E+09
Field Value
Calculated
protected bool Calculated
Field Value
Cells
protected PdfPCell[] Cells
Field Value
- PdfPCell[]
ExtraHeights
extra heights that needs to be added to a cell because of rowspans. @since 2.1.6
protected float[] ExtraHeights
Field Value
- float[]
MaxHeight
protected float MaxHeight
Field Value
RIGHT_LIMIT
the right limit @since 2.1.5
public const float RIGHT_LIMIT = 20000
Field Value
Widths
protected float[] Widths
Field Value
- float[]
Properties
MaxHeights
Gets the maximum height of the row (i.e. of the 'highest' cell).
public float MaxHeights { get; set; }
Property Value
- float
the maximum height of the row
Methods
CalculateHeights()
Calculates the heights of each cell in the row.
public float CalculateHeights()
Returns
- float
the maximum height of the row.
GetCells()
Returns the array of cells in the row. Please be extremely careful with this method. Use the cells as read only objects. @since 2.1.1
public PdfPCell[] GetCells()
Returns
- PdfPCell[]
an array of cells
InitExtraHeights()
Initializes the extra heights array. @since 2.1.6
public void InitExtraHeights()
IsCalculated()
Checks if the dimensions of the columns were calculated.
public bool IsCalculated()
Returns
- bool
true if the dimensions of the columns were calculated
RestoreCanvases(PdfContentByte[])
@since 2.1.6 private is now protected
protected void RestoreCanvases(PdfContentByte[] canvases)
Parameters
canvases
PdfContentByte[]
SaveAndRotateCanvases(PdfContentByte[], float, float, float, float, float, float)
@since 2.1.6 private is now protected
protected void SaveAndRotateCanvases(PdfContentByte[] canvases, float a, float b, float c, float d, float e, float f)
Parameters
SetColumn(ColumnText, float, float, float, float)
@since 3.0.0 protected is now public static
public static float SetColumn(ColumnText ct, float left, float bottom, float right, float top)
Parameters
ct
ColumnTextleft
floatbottom
floatright
floattop
float
Returns
SetExtraHeight(int, float)
Sets an extra height for a cell. @since 2.1.6
public void SetExtraHeight(int cell, float height)
Parameters
SetWidths(float[])
Sets the widths of the columns in the row.
public bool SetWidths(float[] widths)
Parameters
widths
float[]
Returns
- bool
true if everything went right
SplitRow(PdfPTable, int, float)
Splits a row to newHeight. The returned row is the remainder. It will return null if the newHeight was so small that only an empty row would result. an empty row would result
public PdfPRow SplitRow(PdfPTable table, int rowIndex, float new_height)
Parameters
Returns
- PdfPRow
the remainder row or null if the newHeight was so small that only
WriteBorderAndBackground(float, float, float, PdfPCell, PdfContentByte[])
Writes the border and background of one cell in the row. @since 2.1.6 extra parameter currentMaxHeight
public static void WriteBorderAndBackground(float xPos, float yPos, float currentMaxHeight, PdfPCell cell, PdfContentByte[] canvases)
Parameters
xPos
floatThe x-coordinate where the table starts on the canvas
yPos
floatThe y-coordinate where the table starts on the canvas
currentMaxHeight
floatThe height of the cell to be drawn.
cell
PdfPCellcanvases
PdfContentByte[]
WriteCells(int, int, float, float, PdfContentByte[])
Writes a number of cells (not necessarily all cells). Remember that the column index starts with 0. Remember that the column index starts with 0. If -1, all the columns to the end are written.
public void WriteCells(int colStart, int colEnd, float xPos, float yPos, PdfContentByte[] canvases)
Parameters
colStart
intThe first column to be written.
colEnd
intThe last column to be written.
xPos
floatThe x-coordinate where the table starts on the canvas
yPos
floatThe y-coordinate where the table starts on the canvas
canvases
PdfContentByte[]