|
|
File: /var/www/html/php_jh_pdf-1.1.0/class.jh_pdf_flowingtext-1.1.0.inc.php
php_jh_pdf -
jh_pdf_flowingtext
jh_pdf_base | +-- jh_pdf_text | +-- jh_pdf_flowingtext
Class for multi page text output on PDF documents
|
public class jh_pdf_flowingtext extends jh_pdf_text
Class for multi page text output on PDF documents
Extends jh_pdf_text with methods that check, if there is enoughspace left on the current page before putting text on the PDFdocument. If not, a definable function is called which isresponsible for creating a new page.
|
|
|
Methods inherited from jh_pdf_text |
jh_pdf_text, setwidth, setfontface, setfontsize, setfontcolor, setfontparset, setwrapmethod, addtext, getrequiredlinenum, getrequiredheight, puttext, puttext2 |
|
Methods inherited from jh_pdf_base |
setcolor |
|
|
Private Method Summary |
void |
newpage()Begin a new page |
|
Fields inherited from jh_pdf_text |
$pdf, $width, $currentline, $lines, $linewidths, $newparagraph, $fontface, $fontsize, $fontcolor, $fontparset, $wrapmethod, $buffer, $layoutvalid |
|
|
Public Method Details |
jh_pdf_flowingtext |
public void jh_pdf_flowingtext( float &$pdf, float &$ypos, float $firstxpos, float $lastxpos, $lastypos )
|
|
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 |
|
|
|
$lastypos |
|
|
Warning: documentation is missing. |
|
Returns |
void |
See Also |
setnewpagefunction() |
|
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 |
|
putflowingtext |
public void putflowingtext( [ string $alignment, integer $leading ] )
|
|
Output the text
Outputs the text. But before this is done, the remaining spaceon the current page is checked and a new page will be createdby calling the function set via setnewpagefunction() if necessary.
|
Parameter |
|
string |
$alignment |
= >>"left"<< |
|
"left"/"right"/"center" |
|
|
integer |
$leading |
= >>0<< |
|
The text leading that is used
for output |
|
Returns |
void |
|
|
Private Method Details |
newpage |
private void newpage( )
|
|
Begin a new page
Calls the function set through setnewpagefunction() tobegin a new page.
|
Returns |
void |
|
|
|
|
|
PHPDoc 1.0beta |