mPDF Manual – mPDF functions


**WriteText**(**float** w, **float** h, **string** text)

Writes a single line of text directly to the PDF document at a specified position.

See the details for Text() at FPDF.

The methods Cell() and Text() from FPDF are still present, but should not be used directly as they will not cope with UTF-8 encoded text. Use the WriteCell() and WriteText() methods instead.

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. & apos; & #8812; or & #x21a4; can be used, by setting:

$mpdf->text_input_as_HTML = true; (default = false)

This will convert all the above to their apropriate characters, otherwise the text will be output as it is.

For further information, you are referred to the originals at FPDF >> Manual.