将多个PDF文件合并/转换为一个PDF [英] Merge / convert multiple PDF files into one PDF

查看:100
本文介绍了将多个PDF文件合并/转换为一个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(如我先前在此处提出的问题中最初尝试的那样:

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) ).

推荐答案

对不起,我设法通过Google自己找到了答案,还有些运气:)

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屋!

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