ImageMagick 或 GhostScript:将多页 TIFF 转换为多页 PDF
我需要将多页 TIFF 转换为多页 PDF。我可以访问 ImageMagick 和 GhostScript(在 *nix 环境中)。我该怎么做?谢谢。
更新:
事实证明我的测试文件是错误的(它没有多个页面),这让我认为我的命令是错误的。这似乎对我有用:convert input.tif output.pdf
I need to convert a multi-page TIFF to a multi-page PDF. I have access to ImageMagick and GhostScript (in *nix environment). How do I do this? Thanks.
UPDATE:
It turns out that my test file was wrong (it didn't have multiple pages), which made me think my command was wrong. This seems to work for me: convert input.tif output.pdf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这应该可行,尽管可能存在一些问题。
This should work, though there can be some issues.
使用 libtiff 提供的工具集中名为 tiff2ps 的工具:
http://www.libtiff.org/tools。 一旦你有了ps
格式的 tiff,你就可以调用 ps2pdf 来转换为 pdf,它是大多数 Linux 发行版中 Ghostscript 包的一部分。
Use a tool called tiff2ps from the tool set provided by libtiff:
http://www.libtiff.org/tools.html
Once you have the tiff in ps format, you can call ps2pdf to convert to pdf, which is part of the ghostscript package in most linux distributions.
使用以下代码从多页 tiff 文件生成多页 pdf:
Use following code to generate multi page pdf from multi page tiff file:
我在转换多页 TIFF 文件时也遇到过类似的情况。但就我而言,生成的扩展名是 JPG 缩略图。但是,我相信以下代码将运行以将 TIFF 转换为 PDF。 https://web.archive.org/web/20170211082909/http://sourcecodemania.com/how-to-convert-text-to-speech-with-php/
I had a similar situation of converting a multipage TIFF file. but in my case the resulting extension was JPG thumbnail. However, I believe that this following code will run for converting TIFF to PDF. https://web.archive.org/web/20170211082909/http://sourcecodemania.com/how-to-convert-text-to-speech-with-php/