Вопрос

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");

Это было полезно?

Решение 2

Try:

convert page1 page2 output.pdf

You posted just before me :(

I think you will have to add a density.

Другие советы

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
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top