Merger PDF Files Using PDFMerger

Last weekend I got a project from my client. The project is simple enough to create a multiple attachment form with the .pdf extension format, then merge the results of the attachment into a single file that can be downloaded. Previously, I had never handled this simple case. But after implementing it, I managed to make it.

In this case, I use the CodeIgniter Framework Version 3.1.10. Of course, with the addition of a library that is PDFMerger and TCPDF that I get here.

In developing it, of course, there are some obstacles that I face. I get an error like this:

Fatal error: Class ‘PDFMerger’ not found in

This makes me have to search for deeper code related to the library that I use. I tried to find references related to errors that I found. And luckily I got the right solution to this problem.

Multiple uploads with a single form

I also made several forms, which will determine the order in which the files will be the merger.

Uploads with several forms

If you want to see the sample code that I developed, you can see it in this repository.

Thank you for reading my post! Happy Coding!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s