derdida
derdida

Reputation: 14904

TCPDF renders no PNG Image

When i am using TCPDF to create a PDF, everything works fine with .jpg images. But when ill try to use an .png image, no image is shown, just blank white space. There is no error in any log, and the path for the image is correct.

So if ill use:

$pdf->Image($path.$imageURL, 15, 15, 178, 129, 'JPG', '', '');

Everything is fine, the image is there as expected. But with:

$pdf->Image($path.$imageURL, 15, 15, 178, 129, 'PNG', '', '');

where $imageURL is an PNG image, there is no image in my PDF.

Any ideas?

Upvotes: 1

Views: 7368

Answers (1)

Lynxi
Lynxi

Reputation: 820

This page with a lot of examples is very good to start TCPDF

On the example 42 (PHP -> PDF), they use that :

$pdf->Image('images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300);

The doesn't set 'PNG'. I let you try this.

Upvotes: 2

Related Questions