Public Method Details |
jh_pdf_table |
public void jh_pdf_table( float &$pdf, float &$ypos, float $firstxpos, float $lastxpos, mixed $lastypos, integer $defaultcolor )
|
|
Constructor
|
Parameter |
|
float |
&$pdf |
|
|
Variable that stores the current
vertical position |
|
|
float |
&$ypos |
|
|
The left edge of the table |
|
|
float |
$firstxpos |
|
|
The right edge of the table |
|
|
float |
$lastxpos |
|
|
Last vertical position; if the
text block reaches beyond, the
new-page-function which is set
via setnewpagefunction() is
called |
|
|
mixed |
$lastypos |
|
|
The default foreground color
which will be used for elements
that have no color applied to
them |
|
|
integer |
$defaultcolor |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
setheaderbgcolor |
public void setheaderbgcolor( mixed $color )
|
|
Set the background color for the header
Sets the background color that is used for the header.
|
Parameter |
|
mixed |
$color |
|
|
The header background color |
|
Returns |
void |
|
setbgcolors |
public void setbgcolors( array $colors )
|
|
Set the background colors for the rows
Sets the background colors that are used for the rows. The colorsmust be passed as an array and the background colors will bealternating beginning with the first color in the arrayfor the first row an each page.
|
Parameter |
|
array |
$colors |
|
|
The colors for the table rows |
|
Returns |
void |
|
settopborderwidth |
public void settopborderwidth( float $width )
|
|
Set the table's top border width
Sets the width of the border which will be drawn on thebeginning of the table on each page.
|
Parameter |
|
float |
$width |
|
|
The width of the border in PDF pixels |
|
Returns |
void |
|
settopbordercolor |
public void settopbordercolor( mixed $color )
|
|
Set the table's top border color
Sets the color of the border which will be drawn on thebeginning of the table on each page.
|
Parameter |
|
mixed |
$color |
|
|
The color of the border |
|
Returns |
void |
|
setafterheaderborderwidth |
public void setafterheaderborderwidth( float $width )
|
|
Set the table's after-header border width
Sets the width of the border which will be drawn after thetable header on each page.
|
Parameter |
|
float |
$width |
|
|
The width of the border in PDF pixels |
|
Returns |
void |
|
setafterheaderbordercolor |
public void setafterheaderbordercolor( mixed $color )
|
|
Set the table's after-header border color
Sets the color of the border which will be drawn after thetable header on each page.
|
Parameter |
|
mixed |
$color |
|
|
The color of the border in PDF pixels |
|
Returns |
void |
|
setbottomborderwidth |
public void setbottomborderwidth( float $width )
|
|
Set the table's bottom border width
Sets the width of the border which will be drawn on theend of the table on each page.
|
Parameter |
|
float |
$width |
|
|
The width of the border in PDF pixels |
|
Returns |
void |
|
setbottombordercolor |
public void setbottombordercolor( mixed $color )
|
|
Set the table's bottom border color
Sets the color of the border which will be drawn on theend of the table on each page.
|
Parameter |
|
mixed |
$color |
|
|
The color of the border in PDF pixels |
|
Returns |
void |
|
setnewpagefunction |
public void setnewpagefunction( $func )
|
|
Set the end of page callback function
Sets a function which will be called when the end of thepage has been reached. It is entirely up to the this functionto put some final elements on the current page, create a newpage and put elements on it. The function must return thevertical position where the table should be continued.
|
Parameter |
|
|
$func |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
setcolspacingwidth |
public void setcolspacingwidth( float $width )
|
|
Set the column spacing width
Sets the width of a border which will be drawn betweenall the columns.
|
Parameter |
|
float |
$width |
|
|
The width of the inter-column border |
|
Returns |
void |
|
setcolspacingcolor |
public void setcolspacingcolor( mixed $color )
|
|
Set the column spacing color
Sets the color of a border which will be drawn betweenall the columns.
|
Parameter |
|
mixed |
$color |
|
|
The color of the inter-column border |
|
Returns |
void |
|
setrowspacingwidth |
public void setrowspacingwidth( float $width )
|
|
Set the row spacing width
Sets the width of a border which will be drawn betweenall the rows.
|
Parameter |
|
float |
$width |
|
|
The width of the inter-row border |
|
Returns |
void |
|
setrowspacingcolor |
public void setrowspacingcolor( mixed $color )
|
|
Set the row spacing color
Sets the color of a border which will be drawn betweenall the rows.
|
Parameter |
|
mixed |
$color |
|
|
The color of the inter-row border |
|
Returns |
void |
|
setverttableborderwidth |
public void setverttableborderwidth( float $width )
|
|
Set the vertical table border width
Sets the width of a border which will be drawn on the leftand the right side of the table.
|
Parameter |
|
float |
$width |
|
|
The width of the vertical table border |
|
Returns |
void |
|
setverttablebordercolor |
public void setverttablebordercolor( mixed $color )
|
|
Set the vertical table border color
Sets the color of a border which will be drawn on the leftand the right side of the table.
|
Parameter |
|
mixed |
$color |
|
|
The color of the vertical table border |
|
Returns |
void |
|
&addcolumn |
public void &addcolumn( string $heading, float $width, object [unknown] $headerjhpci, object [unknown] $normjhpci )
|
|
Add a column to the table
Adds a column to the table. You have to pass the data for thetable header, the width and JHPCI (JH PDF container interface)conformant objects which put the actual data on the PDFdocument.This method will return a colparam object by reference whichcan be used to modify the column parameters.
|
Parameter |
|
string |
$heading |
|
|
The data which will be put into the
header for this column, usually a text
string |
|
|
float |
$width |
|
|
The width of the column in PDF pixels |
|
|
object [unknown] |
$headerjhpci |
|
|
Instance of a JHPCI conformant class
which will be used for putting the
header data onto the PDF document |
|
|
object [unknown] |
$normjhpci |
|
|
Instance of a JHPCI conformant class
which will be used for putting the
row data onto the document |
|
Returns |
void |
|
addrow |
public void addrow( array $dataarray )
|
|
Put a row onto the PDF document
Puts a row onto the PDF document. If there is not enoughspace left on the page, the function set throughsetnewpagefunction() is called.
|
Parameter |
|
array |
$dataarray |
|
|
An array containing one element for
each column |
|
Returns |
void |
|
addcell |
public void addcell( mixed $data )
|
|
Add a cell to the table
Adds a cell to the table. Each added cell will fill up thecurrent row from the left to the right. If the row is complete,it will be output onto the PDF-document.Uncomplete rows will be output automatically when addrow() orendtable() is called.
|
Parameter |
|
mixed |
$data |
|
|
The data to put into the cell |
|
Returns |
void |
|
endtable |
public void endtable( )
|
|
Close the table on the current page
Draws the bottom border, the vertical table border, thecolumn spacing border and creates a new page.
|
Returns |
void |
|