I have a PHP program that fetches alot of individual PDFs from backend and save into a folder.
Currently I am using pdfk to merge the pdfs. Below is the sample code used:
exec("pdftk.exe *.pdf cat output merged.pdf");
How do I merge them according to a particular order, 1st fetched as first page to last fetched as the last page?