clegginabox/pdf-merger 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

clegginabox/pdf-merger

Composer 安装命令:

composer require clegginabox/pdf-merger

包简介

PDF File Merger for PHP5

README 文档

README

Original written by http://pdfmerger.codeplex.com/team/view
Forked from https://github.com/myokyawhtun/PDFMerger

Composer Compatible

I've just forked this package to make it compatible with composer

To install add this line to your composer.json

"clegginabox/pdf-merger": "dev-master"

or

composer require clegginabox/pdf-merger:dev-master

Example Usage

$pdf = new \Clegginabox\PDFMerger\PDFMerger;

$pdf->addPDF('samplepdfs/one.pdf', '1, 3, 4');
$pdf->addPDF('samplepdfs/two.pdf', '1-2');
$pdf->addPDF('samplepdfs/three.pdf', 'all');

//You can optionally specify a different orientation for each PDF
$pdf->addPDF('samplepdfs/one.pdf', '1, 3, 4', 'L');
$pdf->addPDF('samplepdfs/two.pdf', '1-2', 'P');

$pdf->merge('file', 'samplepdfs/TEST2.pdf', 'P');

// REPLACE 'file' WITH 'browser', 'download', 'string', or 'file' for output options
// Last parameter is for orientation (P for Portrait, L for Landscape).
// This will be used for every PDF that doesn't have an orientation specified

统计信息

  • 总下载量: 2.18M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 162
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 159
  • Watchers: 10
  • Forks: 274
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04