Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert image into TCPDF multicell

Tags:

php

tcpdf

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.

like image 457
Vit Kos Avatar asked Sep 30 '13 08:09

Vit Kos


1 Answers

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...');
like image 120
fdehanne Avatar answered Sep 25 '22 20:09

fdehanne