bash 如何从 Linux 上的命令行将一系列图像转换为 PDF?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8955425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 21:32:25  来源:igfitidea点击:

How can I convert a series of images to a PDF from the command line on linux?

imagebashpdf

提问by Jakob Weisblat

I have a scanning server I wrote in cgi/bash and want to be able to convert a bunch of images (all in one folder) to a pdf from the command line. How can that be done?

我有一个用 cgi/bash 编写的扫描服务器,希望能够从命令行将一堆图像(都在一个文件夹中)转换为 pdf。那怎么办呢?

回答by Marvin Pinto

Using imagemagick, you can try:

使用imagemagick,您可以尝试:

convert page.png page.pdf

Or for multiple images:

或者对于多个图像:

convert page*.png mydoc.pdf

回答by ziesemer

Use convertfrom http://www.imagemagick.org. (Readily supplied as a package in most Linux distributions.)

converthttp://www.imagemagick.org使用。(在大多数 Linux 发行版中已作为软件包提供。)