There are images of the same size in .png. How can PHP implement the placement of these images on several A4?

At the same time, no more than 4 images should be placed on one A4 sheet , the result should be given to the user in any format: (.png, .jpg, .pdf)

Example: The user selected 5 images , so he should receive 2 A4 sheets with these images at the output : On the first one there will be 4 images, and on the second one (in the corner).

I will be glad to any advice!

  • one
    Well here without libraries in any way. Collect images of 4 in one image and give the file to download. This will help GD. To generate pdf you need for example DomPDF or analogues. Nontrivial task - Dmitriy
  • all just write echo <img src='test1.png'/><img src='test2.png'/> etc. after ctl + p - Naumov

0