tomsgu/pdf-merger
最新稳定版本:v0.5.0
Composer 安装命令:
composer require tomsgu/pdf-merger
包简介
关键字:
README 文档
README
Simple wrapper for merging pdfs for PHP >= 7.2 based on setasign/fpdi and fpdf libraries, inspired by clegginabox/pdf-merger.
When using a symfony framework you can use tomsgu/pdf-merger-bundle bundle.
Installation
composer require tomsgu/pdf-merger
Usage
$pdfCollection = new PdfCollection(); $pdfCollection->addPdf('filename.pdf', PdfFile::ALL_PAGES, PdfFile::ORIENTATION_PORTRAIT); $pdfCollection->addPdf('filename2.pdf', '1-4,9', PdfFile::ORIENTATION_LANDSCAPE); $pdfCollection->addPdf('filename3.pdf', '1-4,9', PdfFile::ORIENTATION_AUTO_DETECT); $pdfCollection->addPdf('filename4.pdf'); // You can also pass a resource $resource = fopen('filename4.pdf', 'r'); $pdfCollection->addPdf($resource); $fpdi = new Fpdi(); $merger = new PdfMerger($fpdi); /** * Available modes: MODE_FILE, MODE_DOWNLOAD, MODE_STRING, MODE_BROWSER * Orientation: This is a fallback if the orientation wasn't specified when adding pdf. */ $merger->merge($pdfCollection, 'output.pdf', PdfMerger::MODE_FILE, PdfFile::ORIENTATION_LANDSCAPE);
统计信息
- 总下载量: 433.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 2
- 依赖项目数: 28
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-04