54        parent::__construct($phpExcel);
 
   63    public function save($pFilename = NULL)
 
   65        $fileHandle = parent::prepareForSave($pFilename);
 
   68        $paperSize = 
'LETTER';    
 
   72            $orientation = ($this->_phpExcel->getSheet(0)->getPageSetup()->getOrientation()
 
   76            $printPaperSize = $this->_phpExcel->getSheet(0)->getPageSetup()->getPaperSize();
 
   77            $printMargins = $this->_phpExcel->getSheet(0)->getPageMargins();
 
   79            $orientation = ($this->_phpExcel->getSheet($this->
getSheetIndex())->getPageSetup()->getOrientation()
 
   83            $printPaperSize = $this->_phpExcel->getSheet($this->
getSheetIndex())->getPageSetup()->getPaperSize();
 
   84            $printMargins = $this->_phpExcel->getSheet($this->
getSheetIndex())->getPageMargins();
 
   98        if (isset(self::$_paperSizes[$printPaperSize])) {
 
   99            $paperSize = self::$_paperSizes[$printPaperSize];
 
  104        $pdf = 
new TCPDF($orientation, 
'pt', $paperSize);
 
  105        $pdf->setFontSubsetting(FALSE);
 
  107        $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72);
 
  108        $pdf->SetAutoPageBreak(TRUE, $printMargins->getBottom() * 72);
 
  110        $pdf->setPrintHeader(FALSE);
 
  111        $pdf->setPrintFooter(FALSE);
 
  124        $pdf->SetTitle($this->_phpExcel->getProperties()->getTitle());
 
  125        $pdf->SetAuthor($this->_phpExcel->getProperties()->getCreator());
 
  126        $pdf->SetSubject($this->_phpExcel->getProperties()->getSubject());
 
  127        $pdf->SetKeywords($this->_phpExcel->getProperties()->getKeywords());
 
  128        $pdf->SetCreator($this->_phpExcel->getProperties()->getCreator());
 
  131        fwrite($fileHandle, 
$pdf->output($pFilename, 
'S'));
 
  133                parent::restoreStateAfterSave($fileHandle);
 
An exception for terminatinating execution or to throw for unit testing.
static getPdfRendererPath()
Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use.
const ORIENTATION_LANDSCAPE
generateHTMLFooter()
Generate HTML footer.
getSheetIndex()
Get sheet index.
generateHTMLHeader($pIncludeStyles=false)
Generate HTML header.
generateSheetData()
Generate sheet data.
getPaperSize()
Get Paper Size.
getOrientation()
Get Orientation.
save($pFilename=NULL)
Save PHPExcel to file.
__construct(PHPExcel $phpExcel)
Create a new PHPExcel_Writer_PDF.
PHP class for generating PDF documents without requiring external extensions.
$pdfRendererClassFile
Require tcPDF library.