How to merge multiple PDF files to one one-page PDF in PHP

12,924

You can do this with FPDF and FPDI. A good demo to start is available here. You just have to remove the drawing of borders and offsets.

Share:
12,924
Macejkou
Author by

Macejkou

Updated on July 14, 2022

Comments

  • Macejkou
    Macejkou almost 2 years

    I have a bulk of small pdf files of bar-code labels. Lets say 1/4 of A4 each. What I want to do is to merge them all together so I have 4 labels per page (labels stacked 2x2 on one page). So I can print them all at once.

    Is it possible to combine pdf files like this in PHP? There are some PDF merge libraries out there but all examples are adding/removing whole pages.

    Do you have any experience with this?