Apr 15, 2010 at 8:40 AM
Edited Apr 15, 2010 at 8:52 AM
How can I show all tabs' contents? and I would like to do page break for each tab as well.
$fileType = 'Excel5';
$fileName = 'test.xls';
$outputFileType = 'PDF';
$outputFileName = 'test.pdf';
$objPHPExcel = PHPExcel_IOFactory::load($fileName);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $outputFileType);
Also when I open a pdf report file, then I found out that image and text are too big, so some stuff is cut at right side, for that I would like to fix that problem too.
Around line 110 of Classes/PHPExcel/Writer/PDF.php
// Default PDF paper size
$paperSize = 'A4';
$orientation = 'P';
You can change the paper size by modifying the code: we should probably provide a method to do this, but it doesn't exist yet.
And use the $objPHPExcel->getSheet($index)->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
to set the page orientation to landscape.
You might look at
$objPHPExcel->getSheet($index)->getPageSetup()->setPaperSize() for each tab index as an alternative to changing the $paperSize value in PDF.php, but I'm not sure it works with the PDF exporter
Also, take a look at
$objPHPExcel->getSheet($index)->getPageSetup()->setFitToPage() and the other page scaling methods