Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jurosh/php-pdf-merge
PDF Merge library for PHP
https://github.com/jurosh/php-pdf-merge
Last synced: 3 months ago
JSON representation
PDF Merge library for PHP
- Host: GitHub
- URL: https://github.com/jurosh/php-pdf-merge
- Owner: jurosh
- License: apache-2.0
- Created: 2014-11-15T19:59:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T16:51:07.000Z (7 months ago)
- Last Synced: 2024-07-25T19:17:05.429Z (4 months ago)
- Language: PHP
- Size: 202 KB
- Stars: 130
- Watchers: 8
- Forks: 37
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF Merge for PHP
PDF Merge library for PHP.
Install with composer:
`composer require jurosh/pdf-merge`
Should add dependency:
```json
"jurosh/pdf-merge": "^2.0"
```## Highlights
Pdf merging with modes portrait/landscape.
Tested in Laravel4 & Laravel5 framework (but still can be used without any framework as standalone utility).
## Usage
```php
// Autoload composer classses...// and now we can use library
$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');
```That's it!
Enjoy and leave star if you like it :)