From 6d72423579b1af098bfa47351c87133676b1aeea Mon Sep 17 00:00:00 2001 From: januar Date: Sat, 10 May 2014 18:24:51 +0700 Subject: [PATCH] change sequential validation for orientation dompdf --- Classes/PHPExcel/Writer/PDF/DomPDF.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Writer/PDF/DomPDF.php b/Classes/PHPExcel/Writer/PDF/DomPDF.php index 9ba97ef..01e4e01 100644 --- a/Classes/PHPExcel/Writer/PDF/DomPDF.php +++ b/Classes/PHPExcel/Writer/PDF/DomPDF.php @@ -83,6 +83,9 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP $printMargins = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageMargins(); } + + $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; + // Override Page Orientation if (!is_null($this->getOrientation())) { $orientation = ($this->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) @@ -98,7 +101,6 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP $paperSize = self::$_paperSizes[$printPaperSize]; } - $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; // Create PDF $pdf = new DOMPDF();