jquery - How to Merge Multiple PDF Files Into One PDF using php mpdf library
one text
Solution:
I have no idea how you can use mpdf, but I did all this in production, on Linux, with excellent results in terms of quality, size and time as fallows:
- all raster files are converted to PDF invoking 'convert -density 150 -strip -interlace JPEG -compress JPEG -quality 72' [file] [fileDst]'.
- once you have all PDF files invoke 'gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=[pdfDstFile] [filesInput].
There is no need to create html files, just install required Linux packages and process input files. (please check syntax and adjust parameters, the code was simply pasted from my code)
Source