PHP Classes

Easy Merge2PDF: Merge PDF and Image files into a single PDF file

Recommend this page to a friend!
  Info   View files Documentation   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 128 This week: 2All time: 9,367 This week: 96Up
Version License PHP version Categories
easy-merge2pdf 1.0.0The PHP License5PHP 5, Graphics, Files and Folders, C...
Description 

Author

This package can merge PDF and Image files into a single PDF file.

It can take a list of files in PDF and image files and combines the files to generate a PDF output file.

The package uses the merge2pdf command to combine the input files to generate the final PDF document file.

The package can take options to configure the details of the final document, for instance, the document image size and the image quality.

Innovation Award
PHP Programming Innovation award nominee
September 2022
Number 5
Some applications need to combine text and images into a single document. The PDF format suits that purpose when the users want to print the document.

If you already have separate documents and images you want to combine, this package provides a solution that uses an external program with the name merge2pdf that you can use on the machine you use to run PHP.

Manuel Lemos
Picture of Roni
  Performance   Level  
Name: Roni is available for providing paid consulting. Contact Roni .
Classes: 12 packages by
Country: Bangladesh Bangladesh
Age: ???
All time rank: 279835 in Bangladesh Bangladesh
Week rank: 106 Up2 in Bangladesh Bangladesh Up
Innovation award
Innovation award
Nominee: 6x

Documentation

EasyMerge2pdf

Build Status Coverage Status Latest Stable Version Total Downloads

EasyMerge2pdf is a PHP library for merging Images and PDFs. It uses the excellent merge2pdf command available for OSX, linux, windows.

Installation

composer require ronisaha/easy-merge2pdf

Usages

<?php
require_once 'vendor/autoload.php';

$m = new \EasyMerge2pdf\Merger(['auto' => true]);
or 
$m = new \EasyMerge2pdf\Merger(['binary' => '/path/to/merge2pdf']);
$m->addInput('/path/to/input.pdf', '1,3-8,2,1');
try {
    $m->merge('/path/to/out.pdf');
} catch (Exception $exception) {
    echo $exception->getMessage();
}

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (4 files)
Files folder imagetests (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file ci.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file CommandRuntimeException.php Class Class source
  Plain text file FileSystemRuntimeException.php Class Class source
  Plain text file InputNormalizer.php Class Class source
  Plain text file Merger.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file ExtendedMerger.php Class Class source
  Plain text file InputNormalizerTest.php Class Class source
  Plain text file MergerTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:128
This week:2
All time:9,367
This week:96Up