无损合并PDF(PHP) [英] Lossless merging of PDFs (PHP)

查看:128
本文介绍了无损合并PDF(PHP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在使用 ImageMagick 将多个PDF合并到一个PHP脚本中Linux系统。但是,生成的PDF质量非常低。我偶然发现了 pdftk ,它在合并后似乎有更好的质量,但我需要如果可能的话,使用ImageMagick,因为我需要让脚本在另一台没有pdftk的服务器上运行(并且在那里使用它会很痛苦。)

Currently I am using ImageMagick to merge multiple PDFs into one in a PHP script on my Linux system. However, the resulting PDFs are of very low quality. I have stumbled across pdftk which seems to have a better quality after the merging, but I need to use ImageMagick if possible because I need to get the script to run on another server which does not have pdftk (and it would be a pain to get it on there).

如何使用ImageMagick和PHP合并无损质量的PDF?

How can I merge PDFs using ImageMagick and PHP with lossless quality?

推荐答案

ImageMagick无法进行无损PDF合并。如果您有Linux服务器,您可以尝试pdfconcat(它可以非常快速地进行无损合并):

ImageMagick can't do lossless PDF merging. If you have a Linux server, you may try pdfconcat (which does lossless merging very quickly):

$ wget -O pdfconcat http://www.math.bme.hu/~pts/cvsget.cgi/u=bin.i386/p=/M=bin.i386/c=f1/n=/bin.i386/pdfconcat
$ chmod +x pdfconcat
$ ./pdfconcat -o output.pdf input1.pdf input2.pdf input3.pdf

这篇关于无损合并PDF(PHP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆