This is not an attempt to combine individual PDF files into a single PDF file with multiple pages. This is an attempt to create a one-page PDF file from several other PDF files that already exist. I need to do this using PHP and the server is CentOS.
I am already creating a set of one-page PDF files based on individual templates (using FPDF). The requirement is to allow the user to mix and map existing PDF files and place them together to create a single PDF file.
My current attempt is to convert PDF files to images (using ghostscript) and use the output jpegs to create the final PDF file using FPDF. Although itβs possible, PDF quality is slightly degraded during conversion.
I would like to know if there is a better solution we can use?
UPDATE
The solution does not have to be PHP. Most likely, this will not happen. I am definitely for any command line tool that can do the job. An example command would look like this:
$ newtool -o outfile.pdf -s WidthXHeight -i in1.pdf in2.pdf in2.pdf -g p1Xp2 p3Xp4 p5Xp6
The above is an example - not a real team - I just want it if the tool has such functionality. Indicate the set of input files and their position in the output file.
dakdad
source share