Is this possible to add multiple image type in TCPDF

1.1k views Asked by At

I am using tcpdf to make PDF file from a form and email that file to User through mail function of open cart. I have a custom form which takes image through file upload i store that image through post method and pass that variable to tcpdfimage function like this.

 $pdf->Image($Image, 32, 160, 30, 30, 'GIF');

As u can see that its file type is GIF At the moment. If i upload a png image it wont show in my pdf. Is there any way i can upload any type of image??

1

There are 1 answers

0
Ammar Ul Hassan On

Fixed it by not defining any type in it.

Old: $pdf->Image($Image, 32, 160, 30, 30, 'GIF');

New: $pdf->Image($Image, 32, 160, 30, 30, '');