i want to merge pdf in laravel trying by package lynX39 But can not complete install

3.2k Views Asked by At
  • Installing lynx39/lara-pdf-merger (dev-master e952590): Cloning e95259079c

In Git.php line 325:

Failed to clone https://github.com/deltaaskii/lara-pdf-merger.git via https
, ssh protocols, aborting.

  • https://github.com/deltaaskii/lara-pdf-merger.git
    Cloning into '/home/mostafa/Web App/tmc/vendor/lynx39/lara-pdf-merger'...
    fatal: unable to access 'https://github.com/deltaaskii/lara-pdf-merger.gi
    t/': Could not resolve host: github.com

  • [email protected]:deltaaskii/lara-pdf-merger.git
    Cloning into '/home/mostafa/Web App/tmc/vendor/lynx39/lara-pdf-merger'...
    ssh: Could not resolve hostname github.com: Name or service not known
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

1

There are 1 best solutions below

4
On

Finally I Got Solution By Using anther https://github.com/jurosh/php-pdf-merge Package that not depend on Lynx39

"jurosh/pdf-merge": "^2.0"

$pdf = new \Jurosh\PDFMerge\PDFMerger;

// add as many pdfs as you want
$pdf->addPDF('path/to/source/file.pdf', 'all', 'vertical')
  ->addPDF('path/to/source/file1.pdf', 'all')
  ->addPDF('path/to/source/file2.pdf', 'all', 'horizontal');

// call merge, output format `file`
$pdf->merge('file', 'path/to/export/dir/file.pdf');

Tested and Worked Well ....