Skip to content

Commit 07edaba

Browse files
Allow multiple pdf page exports, fixes issue SpartnerNL#386
1 parent 200543e commit 07edaba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ protected function _setWriter()
471471
{
472472
// Set pdf renderer
473473
if ($this->format == 'PDF')
474+
{
474475
$this->setPdfRenderer();
476+
}
475477

476478
// Create the writer
477479
$this->writer = PHPExcel_IOFactory::createWriter($this->excel, $this->format);
@@ -484,6 +486,12 @@ protected function _setWriter()
484486
$this->writer->setLineEnding(Config::get('excel.csv.line_ending', "\r\n"));
485487
}
486488

489+
// Set CSV delimiter
490+
if ($this->format == 'PDF')
491+
{
492+
$this->writer->writeAllSheets();
493+
}
494+
487495
// Calculation settings
488496
$this->writer->setPreCalculateFormulas(Config::get('excel.export.calculate', false));
489497

0 commit comments

Comments
 (0)