PHP - How to combine / merge multiple pdf's

后端 未结 2 1016
北荒
北荒 2020-12-12 07:01

I have some pdf documents on a linux server that I want to combine together to form one document using PHP 5?

Does anyone know if this can be done?

Thanks

2条回答
  •  佛祖请我去吃肉
    2020-12-12 07:38

    use GS

    gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf
    

    taken from: http://mylinuxnotes.wordpress.com/2007/09/19/howto-join-pdf-files/ documentation: https://www.linux.com/news/software/applications/8229-putting-together-pdf-files

    pdftk - Why NOT?

    pdftk uses too many dependencies (and java!!! :O). For this task you can avoid this by using gs.


    pdftk better :D merges faster. i have 600pdf and pdtfk took ~11sec, while gs 6min maybe there is some gs options, but pdftk simpler (bow)

提交回复
热议问题