PHPackages                             virdiggg/merge-files - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. virdiggg/merge-files

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

virdiggg/merge-files
====================

Merge words, excel, PDF and image into a single PDF

2.2.0(1y ago)173MITPHPPHP &gt;=7.3.0

Since Nov 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/virdiggg/merge-files)[ Packagist](https://packagist.org/packages/virdiggg/merge-files)[ RSS](/packages/virdiggg-merge-files/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (14)Used By (0)

A Simple File Merging Library
=============================

[](#a-simple-file-merging-library)

[![](https://camo.githubusercontent.com/384aaeac5ac31b49cf3b8a4bfe2811c720b390117319c63ee0f524c1e211de6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f76697264696767672f6d657267652d66696c6573)](https://camo.githubusercontent.com/384aaeac5ac31b49cf3b8a4bfe2811c720b390117319c63ee0f524c1e211de6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f76697264696767672f6d657267652d66696c6573) [![](https://camo.githubusercontent.com/18e4ddcfbbc33e726cef9f1c5fcaad1d1ec32ae903a2bd6ace8f3b6743190a08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f646569676e697465722d2d76657273696f6e2d332d677265656e)](https://camo.githubusercontent.com/18e4ddcfbbc33e726cef9f1c5fcaad1d1ec32ae903a2bd6ace8f3b6743190a08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f646569676e697465722d2d76657273696f6e2d332d677265656e) [![](https://camo.githubusercontent.com/9bb19b7df62dbed74d8dfc0eb58cc5cf257c0760bfb159a2a7b72d16aac5309b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f76697264696767672f6d657267652d66696c6573)](https://camo.githubusercontent.com/9bb19b7df62dbed74d8dfc0eb58cc5cf257c0760bfb159a2a7b72d16aac5309b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f76697264696767672f6d657267652d66696c6573)

Not support image inside docx/doc
---------------------------------

[](#not-support-image-inside-docxdoc)

I don't plan to update this library in the meantime
---------------------------------------------------

[](#i-dont-plan-to-update-this-library-in-the-meantime)

`mbstring` extension is needed
------------------------------

[](#mbstring-extension-is-needed)

### HOW TO USE

[](#how-to-use)

- Install this library with composer

```
composer require virdiggg/merge-files
```

- Install [Ghostscript](https://ghostscript.readthedocs.io/en/gs10.04.0/Install.html) and make sure it can be called in command promp with `gs`. You will get something like this when you type `gs`.

```
$ gs
$ GPL Ghostscript 10.04.0 (2024-09-18)
$ GS >
```

- Create function to call this library

```
