Git Product home page Git Product logo

pdfmerger's Introduction

pdfmerger

PHP library for merging multiple PDFs using FPDI

Based on PDFMerger created by Jarrod Nettles December 2009

https://pdfmerger.codeplex.com/

Class for easily merging PDFs (or specific pages of PDFs) together into one. Output to a file, browser, download, or return as a string.

Unfortunately, this class does not preserve many of the enhancements your original PDF might contain. It treats your PDF page as an image and then concatenates them all together.

Note that your PDFs are merged in the order that you provide them using the addPDF function, same as the pages.

If you put pages 12-14 before 1-5 then 12-15 will be placed first in the output.

All of these packages are free and open source software, bundled with this class for ease of use.

Installation

Install using composer.

composer require erc/pdfmerger

Usage

use erc\pdfmerger\PDFMerger;

$pdf = new PDFMerger;
try {
  $pdf->addPDF('a.pdf')
	  ->addPDF('b.pdf')
	  ->addPDF('c.pdf')
	  ->merge('file', 'd.pdf');
} catch(Exception $e){
  echo $e->getMessage();
}

pdfmerger's People

Contributors

everright avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

yasinstc epaka-pl

pdfmerger's Issues

make compatible with php 7.3

Getting the following errors in php 7.3

Deprecated function: assert(): Calling assert() with a string argument is deprecated in erc\pdfmerger\PDFMerger->addRaw() (line 90 of /var/www/html/vendor/erc/pdfmerger/src/PDFMerger.php).

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in erc\pdfmerger\fpdf\fpdf->_putimages() (line 1568 of /var/www/html/vendor/erc/pdfmerger/src/fpdf/fpdf.php).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.