Multiple sheets in PDF

Topics: Developer Forum, Project Management Forum
May 6, 2008 at 4:14 PM
So I just issued a patch that was rightfully declined (didn't even know about php://output), and therefore wanted to talk about the next big thing I need before actually looking at code. I might just change it to fit in one sheet when doing a pdf, but it would be nicer having each sheet do a page break so that the PDF writer would support it. Is there a reason the PDF writer does not currently support sheets?

May 6, 2008 at 5:25 PM
The PDF writer was a quick implementation of a PHP writer engine. It is possible for us to implement this in the next release of PHPExcel. A work item is on its way.
May 6, 2008 at 5:26 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 12, 2009 at 6:07 AM
I have just downloaded version 1.6.5 and attempted to output a multi-sheet workbook to PDF. To get it to work I had to comment out the code
$this->_sheetIndex     = 0;

in the constructor (line 91) because further down (line 113) getting all the sheets is conditional on $this->_sheetIndex being null

Feb 13, 2009 at 2:02 AM
Hi Geoffrey,

Actually, I believe this is correct behavior. According to the documentation, if you want to write all sheets with the PDF writer, this is the method:

$writer = new PHPExcel_Writer_PDF($objPHPExcel);