Php – Insert image into TCPDF multicell

PHPtcpdf

Using MultiCell() method to achieve desired structure. Before I printed text in a cell and it was ok. Now i need to put an image instead. I tried to use inside MultiCell() the TCPDF's Image() method but it breaks the structure of my table. What is a workaround for this ? Thanks.

Best Answer

Image() is used like a cell, this is probably why it break what is following in MultiCell().

If you want to insert image into your text, it's better to use writeHTMLCell() and use <img /> tag.

$pdf->writeHTMLCell(100, 50, 10, 10, 'Lorem ipsum... <img src="..." /> Curabitur at porta dui...');
Related Topic