diff --git a/composer.json b/composer.json index 361ddb5..5a92b1f 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "lynx39/lara-pdf-merger", + "name": "daltcore/lara-pdf-merger", "description": "", "keywords": ["merger","merge","pdf","manage","paginate", "laravel"], "license" : [ @@ -10,12 +10,16 @@ "name": "Michael Musso", "email": "lynx@deltaaskii.com", "homepage": "https://github.com/LynX39" + }, { + "name": "Ramon Smit", + "email": "rsmit@daltcore.com", + "homepage": "https://github.com/daltcore" } ], "require": { "php" : ">=5.4" }, - "homepage" : "https://github.com/LynX39/lara-pdf-merger", + "homepage" : "https://github.com/daltcore/lara-pdf-merger", "autoload": { "psr-0": { "LynX39\\LaraPdfMerger": "src/" diff --git a/src/LynX39/LaraPdfMerger/PdfManage.php b/src/LynX39/LaraPdfMerger/PdfManage.php index 9d79cbb..7bcd312 100644 --- a/src/LynX39/LaraPdfMerger/PdfManage.php +++ b/src/LynX39/LaraPdfMerger/PdfManage.php @@ -18,6 +18,7 @@ class PdfManage * @param $filepath * @param $pages * @return void + * @throws Exception */ public function addPDF($filepath, $pages = 'all', $orientation = null) { @@ -37,10 +38,11 @@ public function addPDF($filepath, $pages = 'all', $orientation = null) /** * Merges your provided PDFs and outputs to specified location. * @param $outputmode - * @param $outputname + * @param $outputpath * @param $orientation * @array $meta [title => $title, author => $author, subject => $subject, keywords => $keywords, creator => $creator] * @return PDF + * @throws Exception */ public function merge($outputmode = 'browser', $outputpath = 'newfile.pdf', $orientation = null, $meta = []) { @@ -54,7 +56,7 @@ public function merge($outputmode = 'browser', $outputpath = 'newfile.pdf', $ori // setting the meta tags if (!empty($meta)) { - $this->setMeta($meta); + $this->setMeta($fpdi, $meta); } // merger operations diff --git a/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php b/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php index ab96b36..cd71661 100755 --- a/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php +++ b/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php @@ -483,7 +483,7 @@ protected function decodeXrefStream($startxref, $xref=array()) { $v = $sarr[$key]; if (($key == '/Type') AND ($v[0] == PDF_TYPE_TOKEN AND ($v[1] == 'XRef'))) { $valid_crs = true; - } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) { + } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND ($v[1] >= 2))) { // first object number in the subsection $index_first = intval($v[1][0][1]); // number of entries in the subsection