Issue
I'm trying to save docs made by phpExcel into pdf format. Everything is fine, except for the fact that my file is very wide and doesn't fit in one page (so part of the data is lost behind the doc border)
I tried to use:
$phpExcel->getActiveSheet()->getPageSetup()->setFitToPage(true);
$phpExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1);
$phpExcel->getActiveSheet()->getPageSetup()->setFitToHeight(0);
But nothing changed. (And as I understand these only works for print version, not for converting to PDF). Does anyone has any ideas how to improve that?
Solution
I solve this issue with the following command:
$phpExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3);
Answered By - Solonka Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.