(mPDF >= 4.0)
WriteFixedPosHTML — Write HTML to a fixed position on the current page
void WriteFixedPosHTML ( string $html , float $x , float $y , float $w , float $h [, string $overflow ])
Write HTML to a fixed position on the current page.
This parameter specifies the text to write to the document - parsed as HTML code
Sets the $x position of the (left edge) of the block element, set in mm from the left of the page.
Sets the $y position of the (top edge) of the block element, set in mm from the top of the page.
Sets the width of the block element, in mm.
Sets the height of the block element, in mm.
Specifies how to handle text which would not fit inside the block element, with its dimensions as specified.
'visible': show all text, even if it spills over outside the dimensions of the block element
'hidden': hide any text (clip) which spills over outside the dimensions of the block element
'auto': force text to be reduced in size if required to fit inside the dimensions of the block element
BLANK uses the default value of
|4.0||Function was added.|
<?php $mpdf = new \Mpdf\Mpdf(); $mpdf->WriteHTML(' Beginning bit of document... '); $mpdf->WriteFixedPosHTML(' This text will appear just where I want it! ', 30, 120, 50, 90, 'auto'); $mpdf->Output();