Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: Unable to format output at all

$
0
0

Hi,

i was experiencing the same problem when trying to export a excel document to pdf in landscape mode using mPDF. I'm using PHPEXCEL 1.7.8

I have found a workaround, but you have to modify the mPDF.php file in the directory PDFPHPExcel\Writer\PDF at line 110.

The original block of code is:

        $pdf = new mpdf();
        $pdf->_setPageSize(strtoupper($paperSize), $orientation);
        $pdf->DefOrientation = $orientation;

The modified (working) block of code is:

        $pdf = new mpdf();
        $ortmp = $orientation;
        $pdf->_setPageSize(strtoupper($paperSize), $ortmp);
        $pdf->DefOrientation = $orientation;
        $pdf->AddPage($orientation);

it seems like the problematic line is the setPageSize function line which overrides the chosen orientation.

I have not investigated further on the problem, and I know this workaround is not the ideal solution, but it works.

Hopefully the PHPExcel team will provide a better solution.

 

Regards


Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>