Asked 7 years ago
16 Jun 2017
Views 3551
jaggy

jaggy posted

TCPDF : what should be solution to place image properly at header ?

TCPDF generate some error when i try to change image of header


$pdf->SetHeaderData(dirname(__FILE__)."/images/logo.png", PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));



error


TCPDF ERROR: [Image] Unable to get the size of the image: /home8/public_html/r/lib/TCPDF/examples/images/home8/public_html/images/logo.png


its seems repeat image path twice

so what should be solution to place image properly at header
jaydeep

jaydeep
answered Nov 30 '-1 00:00

simple intialiaze a constant at starting of the pdf generation code .

define('K_PATH_IMAGES','');

so code will be like

define('K_PATH_IMAGES','');
// start tcpdf code
 require_once('tcpdf.php');

Post Answer