Public Method Details |
jh_pdf_text |
public void jh_pdf_text( &$pdf )
|
|
Constructor
|
Parameter |
|
|
&$pdf |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
setwidth |
public void setwidth( float $width )
|
|
Set the text block width
Sets the text block width meassured in PDF pixels.
|
Parameter |
|
float |
$width |
|
|
The width meassured in PDF pixels |
|
Returns |
void |
|
setfontface |
public void setfontface( string $fontface )
|
|
Set the font face
Sets the font face which will be used for the text block.
|
Parameter |
|
string |
$fontface |
|
|
The font face (e.g. "Helvetica",
"Times Roman") |
|
Returns |
void |
|
setfontsize |
public void setfontsize( float $fontsize )
|
|
Set the font size
Sets the font size which will be used for the text block.
|
Parameter |
|
float |
$fontsize |
|
|
The font size |
|
Returns |
void |
|
setfontcolor |
public void setfontcolor( mixed $fontcolor )
|
|
Set the font color
Sets the font color which will be used for the text block.
|
Parameter |
|
mixed |
$fontcolor |
|
|
The font color |
|
Returns |
void |
|
setfontparset |
public void setfontparset( array $parameters )
|
|
Set the font parameters
Set the fonts parameters which will be used for the text block.
|
Parameter |
|
array |
$parameters |
|
|
The font parameters which will be set
("underline", "overline", "strikeout",
see PDFlib-manual). |
|
Returns |
void |
|
setwrapmethod |
public void setwrapmethod( string $method )
|
|
Set the method for line wrapping
Sets the method for line wrapping which will be used for thetext block.
|
Parameter |
|
string |
$method |
|
|
One out of "char", "word" and
"wordstrict".
"char" means to wrap the line before the
first character not fitting into the line.
"word" means to wrap the line before the
first word not completely fittig into the
line. If even one single word does not fit
into a line, it is wrapped like in "char"
mode.
"wordstrict" behaves like "word" except in
the case where even one single word does
not fit into a line. In this case the word
will remain unwrapped, thus reaching beyond
the specified rectangle. |
|
Returns |
void |
|
addtext |
public void addtext( string $text, boolean $sep )
|
|
Append a string to the text buffer
Appends a string to the current text buffer which will laterbe output via puttext().
|
Parameter |
|
string |
$text |
|
|
The string to be added |
|
|
boolean |
$sep |
|
|
Assures that the text will be seperated from
the current text by a space character |
|
Returns |
void |
|
getrequiredlinenum |
public void getrequiredlinenum( )
|
|
Returns the number of required output lines
Returns the number of lines which are required when the textis output with the current parameters (font face, font size andwrap method). Note that there will be no performance penaltywhen calling this method before puttext() as the resultsare cached in class variables. In fact, this method willbe called by puttext() anyway as this is the actual layoutengine!
|
Returns |
void |
|
getrequiredheight |
public void getrequiredheight( float $leading )
|
|
Returns the required output height
Returns the number of pixels which are required when the textis output with the current parameters and the specified leading.
|
Parameter |
|
float |
$leading |
|
|
Text leading for which the required
height should be calculated. |
|
Returns |
void |
|
puttext |
public void puttext( float $xpos, float $ypos, string $alignment, float $leading )
|
|
Output the the via the integrated layout engine
Outputs the text via the integrated layout engine at thespecified coordinates, alignment and leading.
|
Parameter |
|
float |
$xpos |
|
|
The left starting position |
|
|
float |
$ypos |
|
|
The top starting position |
|
|
string |
$alignment |
|
|
"left"/"right"/"center" |
|
|
float |
$leading |
|
|
The text leading |
|
Returns |
void |
|
puttext2 |
public void puttext2( float $xpos, float $ypos, string $alignment, float $leading )
|
|
Outputs the the via PDF_show_boxed()
Outputs the text via PDF_show_boxed() at thespecified coordinates, alignment and leading.
|
Parameter |
|
float |
$xpos |
|
|
The left starting position |
|
|
float |
$ypos |
|
|
The top starting position |
|
|
string |
$alignment |
|
|
"left"/"right"/"center" |
|
|
float |
$leading |
|
|
The text leading |
|
Returns |
void |
|