Pregunta

I'm not finding in the documentation where to take 2 PDFs and combine them into 1 file where image1.pdf will be page 1 and image2.pdf will be page2.

Is this even possible?

I see documentation where you can pull images and do a lot of processing FROM a multi-page PDF but not on how to combine them.

**This seems to have worked but with major loss of quality. I'm sure there is a way to combine without touching PDF quality, density, degradation, etc.

exec("convert image1.pdf image2.pdf combined.pdf");

¿Fue útil?

Solución 2

Try:

convert page1 page2 output.pdf

You posted just before me :(

I think you will have to add a density.

Otros consejos

If the imagemagick on your server is able to manipulate the pdfs at all it must be using the ghostscript delegate under the hood. Try the answer used here first using ghostscript directly for best results.

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=temp.pdf pdf1.pdf pdf2.pdf
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top