可否用命令行来拼接pdf文档?
cat ~/test/001.PDF >> ~/test/total.pdf
cat ~/test/002.PDF >> ~/test/total.pdf
拼完后, ~/test/total.pdf中只有 ~/test/002.PDF
反复测试多次都是这样。
如何拼接pdf文档?
-
- 帖子: 980
- 注册时间: 2008-04-12 12:44
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
-
- 帖子: 1453
- 注册时间: 2008-05-24 8:30
Re: 如何拼接pdf文档?
如果不用考虑书签,那么 pdftk 是最好的选择。
-
- 帖子: 980
- 注册时间: 2008-04-12 12:44
Re: 如何拼接pdf文档?
The commandline utilities, Ghostscript and PDFtk, will do what you want.
Code:
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=[output file] [input files]
or
Code:
pdftk [input files] cat output [output file]
In the above commands, you need to insert the names of the input and output files. When combining a large number of PDF files, it may be easiest to place them in an empty directory and use *.pdf as the input files.
Code:
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=[output file] [input files]
or
Code:
pdftk [input files] cat output [output file]
In the above commands, you need to insert the names of the input and output files. When combining a large number of PDF files, it may be easiest to place them in an empty directory and use *.pdf as the input files.