将多个 PDF 文件合并/转换为一个 PDF [英] Merge / convert multiple PDF files into one PDF
问题描述
如何将多个 PDF 文件合并/转换为一个大的 PDF 文件?
How could I merge / convert multiple PDF files into one large PDF file?
我尝试了以下方法,但目标文件的内容不符合预期:
I tried the following, but the content of the target file was not as expected:
convert file1.pdf file2.pdf merged.pdf
我需要一个非常简单/基本的命令行 (CLI) 解决方案.最好的办法是,如果我可以将合并/转换的输出直接传送到 pdf2ps
(正如我之前在此处提出的问题中最初尝试的那样:Linux 管道(转换 -> pdf2ps -> lp)).
I need a very simple/basic command line (CLI) solution. Best would be if I could pipe the output of the merge / convert straight into pdf2ps
( as originally attempted in my previously asked question here: Linux piping ( convert -> pdf2ps -> lp) ).
推荐答案
对不起,我自己用谷歌找到了答案,还有一点运气:)
I'm sorry, I managed to find the answer myself using google and a bit of luck : )
感兴趣的朋友;
我在我们的 debian 服务器上安装了 pdftk(pdf 工具包),并使用以下命令获得了所需的输出:
I installed the pdftk (pdf toolkit) on our debian server, and using the following command I achieved desired output:
pdftk file1.pdf file2.pdf cat output output.pdf
或
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf ...
这又可以直接通过管道传输到 pdf2ps.
This in turn can be piped directly into pdf2ps.
这篇关于将多个 PDF 文件合并/转换为一个 PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!