PHP code example of wahyudev / laravel-pdfmerger

1. Go to this page and download the library: Download wahyudev/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/ */

    

wahyudev / laravel-pdfmerger example snippets


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

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

 php
$oMerger->stream();

 php
$oMerger->download();

 php
echo $oMerger->output();

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