PHP code example of bxi / laravel-pdfmerger

1. Go to this page and download the library: Download bxi/laravel-pdfmerger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bxi / laravel-pdfmerger example snippets


$oMerger->duplexMerge();
 php
'providers' => [
    ...
    Webklex\PDFMerger\Providers\PDFMergerServiceProvider::class
],

'aliases' => [
    ...
    'PDFMerger' => Webklex\PDFMerger\Facades\PDFMergerFacade::class
]
 php
$oMerger->addString(file_get_contents('/path/to/project/vendors/webklex/laravel-pdfmerger/src/PDFMerger/examples/pdf_two.pdf'), [1]);

 php
$oMerger->stream();

 php
$oMerger->download();

 php
echo $oMerger->output();

 php
$oMerger->setFileName('example.pdf');