Definition at line 189 of file oxpdf.php.
Public Member Functions | |
__construct ($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false) | |
WriteHTML ($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') | |
OpenTag ($tag, $attr) | |
CloseTag ($tag) | |
SetStyle ($tag, $enable) | |
PutLink ($URL, $txt) | |
Text ($x, $y, $txt, $stroke=0, $clip=false) | |
SetFont ($family, $style='', $size=0, $fontfile='') |
oxPDF.__construct | ( | $ | orientation = 'P' , |
|
$ | unit = 'mm' , |
|||
$ | format = 'A4' , |
|||
$ | unicode = true , |
|||
$ | encoding = 'UTF-8' , |
|||
$ | diskcache = false | |||
) |
This is the class constructor. It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes).
string | $orientation page orientation. Possible values are (case insensitive):
| |
string | $unit User measure unit. Possible values are:
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. | |
mixed | $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).
| |
boolean | $unicode TRUE means that the input text is unicode (default = true) | |
string | $encoding charset encoding; default is UTF-8 | |
boolean | $diskcache if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower). |
oxPDF.WriteHTML | ( | $ | html, | |
$ | ln = true , |
|||
$ | fill = false , |
|||
$ | reseth = false , |
|||
$ | cell = false , |
|||
$ | align = '' | |||
) |
Prints a cell (rectangular area) with optional borders, background color and html text string. The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
string | $html html text to print. Default value: empty string. | |
int | $ln Indicates where the current position should go after the call. Possible values are:
| |
int | $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. | |
boolean | $reseth if true reset the last cell height (default true). | |
float | $cell if true, the cell extends up to the margin. | |
string | $align allows to center or align the text. Possible values are:
|
oxPDF.OpenTag | ( | $ | tag, | |
$ | attr | |||
) |
oxPDF.CloseTag | ( | $ | tag | ) |
oxPDF.SetStyle | ( | $ | tag, | |
$ | enable | |||
) |
oxPDF.PutLink | ( | $ | URL, | |
$ | txt | |||
) |
oxPDF.Text | ( | $ | x, | |
$ | y, | |||
$ | txt, | |||
$ | stroke = 0 , |
|||
$ | clip = false | |||
) |
Prints a character string. The origin is on the left of the first charcter, on the baseline. This method allows to place a string precisely on the page.
float | $x Abscissa of the origin | |
float | $y Ordinate of the origin | |
string | $txt String to print | |
int | $stroke outline size in points (0 = disable) | |
boolean | $clip if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation). |
oxPDF.SetFont | ( | $ | family, | |
$ | style = '' , |
|||
$ | size = 0 , |
|||
$ | fontfile = '' | |||
) |
Sets font for current text line
NOTICE: In case you have problems with fonts, you must override this function and set different font
string | $family font family | |
string | $style font style [optional] | |
string | $size font size [optional] | |
string | $fontfile font file[optional] |