set fitToPage() is still not working with domPDF

Topics: Developer Forum, Project Management Forum, User Forum
Jun 10, 2014 at 2:31 PM
I was trying to fit my pdf to one page. Here is my code

$xls->addExternalSheet($objReader, 0);
        $xls->removeSheetByIndex(1);
        $xls->setActiveSheetIndex(0);
        $xls->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
        $xls->getActiveSheet()->getPageSetup()->setFitToPage(true);
Its still showing on two pages.
Any help?