Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Fixed PHP 7.2 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Smit committed May 22, 2018
1 parent 11d9d12 commit c460202
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lynx39/lara-pdf-merger",
"name": "daltcore/lara-pdf-merger",
"description": "",
"keywords": ["merger","merge","pdf","manage","paginate", "laravel"],
"license" : [
Expand All @@ -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/"
Expand Down
6 changes: 4 additions & 2 deletions src/LynX39/LaraPdfMerger/PdfManage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class PdfManage
* @param $filepath
* @param $pages
* @return void
* @throws Exception
*/
public function addPDF($filepath, $pages = 'all', $orientation = null)
{
Expand All @@ -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 = [])
{
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c460202

Please sign in to comment.