oont-contents/plugins/aramex-shipping-woocommerce/vendor/jurosh/pdf-merge/example/example.php
2025-02-08 15:10:23 +01:00

20 lines
532 B
PHP

<?php require '../vendor/autoload.php';
// create merger instance
$pdf = new \Jurosh\PDFMerge\PDFMerger;
// do work
// 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
//$pdf->merge('file', 'path/to/export/dir/file.pdf');
//
$pdf->addPDF('example1.pdf', 'all', 'vertical')
->addPDF('example2.pdf', 'all', 'horizontal');
$pdf->merge('file', 'merged.pdf');