I have saved multiple images from google books. I wanted to convert them to a single pdf file, where in I need some inputs. The below two images(one png and one jpeg) are two continuous pages.
I save them in my system. I converted them to pdf using the command below
convert books.png books.jpeg combined.pdf
Run Code Online (Sandbox Code Playgroud)
However the combined.pdf is not giving me expected results, not the combination of the two.
I also tried making individual pdf files, then combining them using pdftk, with no luck
convert books.png book1.pdf
convert books.jpeg book2.pdf
pdftk book1.pdf book2.pdf cat output combined.pdf
Run Code Online (Sandbox Code Playgroud)
αғs*_*нιη 114
使用convert
程序(它是作为Imagemagick工具套件的一部分安装的可执行文件):
convert "*.{png,jpeg}" -quality 100 outfile.pdf
Run Code Online (Sandbox Code Playgroud)
在一般情况下,您可以将多个文件合并到一个 pdf 文件中,并将它们包含在其中{}
并用一个逗号分隔它们。
添加-quality VALUE
以保持转换后的质量。
convert "*.{ext1,ext2,ext3,...}" -quality 100 outfile.pdf
Run Code Online (Sandbox Code Playgroud)
bob*_*bob 15
我使用了您提供的两个示例页面,并使用cups-pdf 打印机打印了它们,从而生成了两个 pdf 文件。
然后我使用pdfsam将 pdf 文件合二为一。我认为结果没有问题。
编辑:我刚刚看到您有很多文件要处理,您可以使用此处描述的 Nautilus 中的打印选择脚本
To *_* Do 12
如果所有图像都在同一个文件夹中并且具有相同的扩展名,您可以执行以下操作:
将图像转换为 pdf:
ls *.tif | xargs -I% convert % %.pdf
Run Code Online (Sandbox Code Playgroud)
注意:请注意,如果它们被命名为 1...tif; 2...tif; 10...tif do
ls -1v
用于编号文件
将 pdf 文件合并为一个 pdf 并删除单页 pdf:
pdftk *.pdf cat output merged.pdf && rm *.tif.pdf
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
102213 次 |
最近记录: |