WriteText — Writes a single line of text directly to the PDF document at a specified position.
void WriteText( float $w, float $h, string $text)
Writes a single line of text directly to the PDF document at a specified position.
Prints a character string. The origin is on the left of the first character, on the baseline.
This method allows to place a string precisely on the page, but it is usually easier to use
Write() which are the standard methods to print text.
Abscissa of the origin, horizontal.
Ordinate of the origin, vertical.
String to print. This method accepts UTF-8 encoded text, and will reverse RTL (right-to-left) text when appropriate.
Text containing HTML entities, as well as decimal and hex e.g.
↤can be used, by setting:
<?php $mpdf->text_input_as_HTML = true; //(default = false)
This will convert all the above to their appropriate characters, otherwise the text will be output as it is.
Note The methods
Text() from FPDF are still present, but should not be used directly as
they will not cope with UTF-8 encoded text. Use the
WriteText() methods instead.
See the details for the original
Text() at FPDF equivalent.