Merge PDF-files

Hi everybody,

Who has an idea how to merge existing PDF’s in a folder to one PDF

Thanks if you are willing to help me

Regards, Bert

I am busy with making pdf s as wel. i do not think SC can merge pdf’s , you can use Adobe for that. however, SC uses an opensource library to make pdf from HTML, and may be you can tweak it and feed it with two htmls so it makes one pdf.

@ctmservice

I use TCPDF + FPDI to merge PDF files.

I published my project in GitHub so if you want to use/have a look here it is:
https://github.com/AndersonMamede/merge-pdf-files

Just download the project and it should merge the files located inside the “test” folder.

Structure of that project:
/fpdi/ - FPDI libraries
/tcpdf/ - TCPDF libraries
/test/ - PDF files used for tests in merge-example.php
/merge-example.php - An example using the MergePdf class
/MergePdf.class.php - The class which uses TCPDF + FPDI to join the files

I created only MergePdf.class.php and merge-example.php, so you can either use TCPDF/FPDI from my project or download them from their official websites - just take care with their version.

I hope it helps you.

1 Like

If this is on a windows machine you can use DOS command as follows:

copy /b mov.pdf + mov.pdf + mov.pdf newfile.pdf

Great…thanks I will try. So easy the world can be