How to add image and text in header and footer of PDF with php excel and dompdf lib

Topics: Developer Forum
Jul 31, 2014 at 7:20 AM
Edited Jul 31, 2014 at 7:22 AM
Please explain me how I can add Images and text to header and footer with PHPexcel and dompdf lib. I am tring to get solution in google but nothing is working for me. please help so far I am doing in this way

$objPHPExcel->setActiveSheetIndex(0);
$currentHeader = $objPHPExcel->getActiveSheet()->getHeaderFooter()->getOddHeader(); $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader($currentHeader.'&C&G TITLE OF PDF');
$objDrawing->setName('Logo');
$objDrawing->setDescription('Logo');
$objDrawing->setPath($DOC_ROOT.LOGO);
$objDrawing->setHeight(500);
$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT);
Coordinator
Jul 31, 2014 at 7:30 AM
Header/Footer settings are only supported for the Excel2007 and Excel5 Writers
Jul 31, 2014 at 7:32 AM
Edited Jul 31, 2014 at 7:37 AM
Means I can add Header and footer for Excel sheet only and not for PDF?
Coordinator
Jul 31, 2014 at 8:05 AM
That's right
Jul 31, 2014 at 8:21 AM
thank you for making this clear.. :)