53 parent::__construct($phpExcel);
62 public function save($pFilename = NULL)
64 $fileHandle = parent::prepareForSave($pFilename);
67 $paperSize =
'LETTER';
71 $orientation = ($this->_phpExcel->getSheet(0)->getPageSetup()->getOrientation()
75 $printPaperSize = $this->_phpExcel->getSheet(0)->getPageSetup()->getPaperSize();
76 $printMargins = $this->_phpExcel->getSheet(0)->getPageMargins();
78 $orientation = ($this->_phpExcel->getSheet($this->
getSheetIndex())->getPageSetup()->getOrientation()
82 $printPaperSize = $this->_phpExcel->getSheet($this->
getSheetIndex())->getPageSetup()->getPaperSize();
83 $printMargins = $this->_phpExcel->getSheet($this->
getSheetIndex())->getPageMargins();
87 $orientation = ($orientation ==
'L') ?
'landscape' :
'portrait';
100 if (isset(self::$_paperSizes[$printPaperSize])) {
101 $paperSize = self::$_paperSizes[$printPaperSize];
107 $pdf->set_paper(strtolower($paperSize), $orientation);
117 fwrite($fileHandle,
$pdf->output());
119 parent::restoreStateAfterSave($fileHandle);
const ORIENTATION_DEFAULT
static getPdfRendererPath()
Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use...
getOrientation()
Get Orientation.
generateHTMLHeader($pIncludeStyles=false)
Generate HTML header.
getSheetIndex()
Get sheet index.
const ORIENTATION_LANDSCAPE
getPaperSize()
Get Paper Size.
save($pFilename=NULL)
Save PHPExcel to file.
__construct(PHPExcel $phpExcel)
Create a new PHPExcel_Writer_PDF.
generateSheetData()
Generate sheet data.
const ORIENTATION_PORTRAIT
$pdfRendererClassFile
Require DomPDF library.
generateHTMLFooter()
Generate HTML footer.