tags:

views:

31

answers:

1
+1  Q: 

tcpdf header image

Hello,

For create custom header and footer i used tcpdf header() and footer() function but when I try to put image on header function with $this->image function image can not be displayed. others are working fine can any body knows whats the problem.

thanks

A: 

Try this example:

$pdf->SetHeaderData("image.jpg", PDF_HEADER_LOGO_WIDTH, "Application PDF", "Application Form\nRaining Pesos, Inc. - www.rainingpesos.com");

The first parameter is where you put the image on the header, but make sure on your path image config,

define ('K_PATH_IMAGES', '/images/');

make sure the images that you want to display on the pdf is in the folder you set, in this example the folder 'images' contains the 'image.jpg'.

Hope it helps!

Manie
the path image config is located on tcpdf_config.php under config folder..
Manie
Hi Manie, Thanks,My problem is solved with the use of .png or .gif images you can put either png or gif image for custom header for custom footer no need to write custom footer function its working as usual Thanks,Once again
Jayu