Skip to main content

Row2

Version: 6.0

cete.dynamicpdf.pageelements.row2

Row2​

Represents a row in a table.

public class Row2
Public Class Row2

Inheritance: Object → Row2

Licensing​

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Professional Edition
  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Professional Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

The following example will display a simple table on the page.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule Sub Main() ' Create a PDF Document Dim MyDocument As Document = New Document ' Create a Page and add it to the document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage) ' Create a table Dim MyTable As Table2 = New Table2(0, 0, 600, 600) ' Add columns to the table MyTable.Columns.Add(150) MyTable.Columns.Add(90) MyTable.Columns.Add(90) MyTable.Columns.Add(90) ' Add rows to the table and add cells to the rows Dim row1 As Row2 = MyTable.Rows.Add(40, ceTe.DynamicPDF.Font.HelveticaBold, _ 16, Grayscale.Black, Grayscale.Gray) row1.CellDefault.Align = TextAlign.Center row1.CellDefault.VAlign = VAlign.Center
row1.CellDefault.Border.Color = RgbColor.Blue
row1.CellDefault.Border.Width = 2.0f
row1.CellDefault.Border.LineStyle = LineStyle.None row1.Cells.Add("Header 1") row1.Cells.Add("Header 2") row1.Cells.Add("Header 3") row1.Cells.Add("Header 4") Dim row2 As Row2 = MyTable.Rows.Add(30) Dim cell1 As Cell2 = row2.Cells.Add("Rowheader 1", Font.HelveticaBold, 16, _ Grayscale.Black, Grayscale.Gray, 1) cell1.Align = CellAlign.Center cell1.VAlign = CellVAlign.Center
cell1.Border.Color = RgbColor.Blue
cell1.Border.Width = 2.0f
cell1.Border.LineStyle = LineStyle.Solid row2.Cells.Add("Item 1") row2.Cells.Add("Item 2") row2.Cells.Add("Item 3")
row2.CellDefault.Border.Left.Color = RgbColor.Green
row2.CellDefault.Border.Top.Width = 3.0f
row2.CellDefault.Border.Right.LineStyle = LineStyle.None
row2.CellDefault.Border.Bottom.Color = RgbColor.Green Dim row3 As Row2 = MyTable.Rows.Add(30) Dim cell2 As Cell2 = row3.Cells.Add("Rowheader 2", Font.HelveticaBold, 16, _ Grayscale.Black, Grayscale.Gray, 1) cell2.Align = TextAlign.Center cell2.VAlign = VAlign.Center
cell2.Border.Color = RgbColor.Blue
cell2.Border.Width = 2.0f
cell2.Border.LineStyle = LineStyle.None row3.Cells.Add("Item 4") row3.Cells.Add("Item 5") row3.Cells.Add("Item 6")
row3.CellDefault.Padding.Left = 4.0f
row3.CellDefault.Padding.Top = 4.0f
row3.CellDefault.Padding.Right = 2.0f
row3.CellDefault.Padding.Bottom = 2.0f
MyTable.CellDefault.Padding.Value = 3.0f
MyTable.CellSpacing = 5.0f
' Add the table to the page MyPage.Elements.Add(MyTable) ' Save the PDF MyDocument.Draw("C:\MyDocument.pdf") End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{static void Main(){ // Create a PDF Document Document document = new Document(); // Create a Page and add it to the document Page page = new Page(); document.Pages.Add( page ); // Create a table Table2 table = new Table2(0, 0, 600, 600); //Add columns to the table table.Columns.Add( 150 ); table.Columns.Add( 90 ); table.Columns.Add( 90 ); table.Columns.Add( 90 ); // Add rows to the table and add cells to the rows Row2 row1 = table.Rows.Add( 40, Font.HelveticaBold, 16, Grayscale.Black, Grayscale.Gray ); row1.CellDefault.Align = TextAlign.Center; row1.CellDefault.VAlign = VAlign.Center;
row1.CellDefault.Border.Color = RgbColor.Blue;
row1.CellDefault.Border.Width = 2.0f;
row1.CellDefault.Border.LineStyle = LineStyle.None; row1.Cells.Add( "Header 1" ); row1.Cells.Add( "Header 2" ); row1.Cells.Add( "Header 3" ); row1.Cells.Add( "Header 4" ); Row2 row2 = table.Rows.Add( 30 ); Cell2 cell1 = row2.Cells.Add( "Rowheader 1", Font.HelveticaBold, 16, Grayscale.Black, Grayscale.Gray, 1 ); cell1.Align = TextAlign.Center; cell1.VAlign = VAlign.Center;
cell1.Border.Left.Color = RgbColor.Blue;
cell1.Border.Right.Width = 2.0f;
cell1.Border.Right.LineStyle = LineStyle.Solid; row2.Cells.Add( "Item 1" ); row2.Cells.Add( "Item 2" ); row2.Cells.Add( "Item 3" );
row2.CellDefault.Border.Left.Color = RgbColor.Green;
row2.CellDefault.Border.Top.Width = 3.0f;
row2.CellDefault.Border.Right.LineStyle = LineStyle.None;
row2.CellDefault.Border.Bottom.Color = RgbColor.Green; Row2 row3 = table.Rows.Add( 30 ); Cell2 cell2 = row3.Cells.Add( "Rowheader 2", Font.HelveticaBold, 16, Grayscale.Black, Grayscale.Gray, 1 ); cell2.Align = TextAlign.Center; cell2.VAlign = VAlign.Center;
cell2.Border.Color = RgbColor.Blue;
cell2.Border.Width = 2.0f;
cell2.Border.LineStyle = LineStyle.None; row3.Cells.Add( "Item 4" ); row3.Cells.Add( "Item 5" ); row3.Cells.Add( "Item 6" );
row3.CellDefault.Padding.Left = 4.0f;
row3.CellDefault.Padding.Top = 4.0f;
row3.CellDefault.Padding.Right = 2.0f;
row3.CellDefault.Padding.Bottom = 2.0f;

table.CellDefault.Padding.Value = 3.0f;
table.CellSpacing = 5.0f;
// Add the table to the page page.Elements.Add( table ); // Save the PDF document.Draw( @"C:\MyDocument.pdf" );}
}

Properties​

ActualRowHeight​

Gets the actual height of the row as it will be displayed. This is different than the Height property.

public float ActualRowHeight { get; }
Public Property ActualRowHeight As Single

Property Value​

Single

CellDefault​

Gets the CellDefault object of the cells in the row.

public CellDefault CellDefault { get; }
Public Property CellDefault As CellDefault

Property Value​

CellDefault

Cells​

Gets the Cell2List containing all the cells in that row.

public Cell2List Cells { get; }
Public Property Cells As Cell2List

Property Value​

Cell2List

Height​

Gets or sets the minimum height of the row.

public float Height { get; set; }
Public Property Height As Single

Property Value​

Single

Remarks​

If no height is specified for a Row this value will return -1. A -1 signifies that the height will automatically adjust to the height of the text.

Tag​

Gets or sets the structure element of the row.

public Tag Tag { get; set; }
Public Property Tag As Tag

Property Value​

Tag

Licensing​

This property is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

TagOrder​

Gets or sets the structure element order of the row.

public int TagOrder { get; set; }
Public Property TagOrder As Int32

Property Value​

Int32

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.PageElements