php-pdf-merge icon indicating copy to clipboard operation
php-pdf-merge copied to clipboard

Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat($size, $orientation) should be compatible with TCPDF::setPageFormat($format, $orientation = 'P')

Open edwinmugendi opened this issue 3 years ago • 0 comments

I'm getting this error:

Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat($size, $orientation) should be compatible with TCPDF::setPageFormat($format, $orientation = 'P')

// and now we can use library

$front = '/home/sapama/projects/web/erp/public/media/erp/upload/cards/front-18980.pdf'; $back = '/home/sapama/projects/web/erp/public/media/erp/upload/cards/back-18980.pdf'; $card = '/home/sapama/projects/web/erp/public/media/erp/upload/cards/18980.pdf';

    // and now we can use library
    $pdf = new \Jurosh\PDFMerge\PDFMerger;

    //Add as many pdfs as you want
    $pdf->addPDF($front, 'all','vertical')
            ->addPDF($back, 'all','vertical');


    //Call merge, output format `file`
    $pdf->merge('file', $card);
   

edwinmugendi avatar Jun 16 '21 08:06 edwinmugendi