如何将图像(PSD、AI 和 EPS)转换为 PDF?
我的 Django 网站的客户可以上传 PDF、PSD、AI 和 EPS 格式的打印设计。如果他们上传的文件类型不是 PDF,我想将其转换为 PDF。
所以我的问题是:如何将 Photoshop、Illustrator 和 CorelDraw 文件转换为 PDF(以编程方式)?
我尝试了 UniConvertor 但它:不支持 PSD,扭曲了我的 AI 输入,并拒绝了我的 EPS输入。知道任何解决方法吗?
我愿意为每种文件类型运行单独的脚本。我用谷歌搜索“psd to pdf”,但结果看起来都像垃圾邮件。 (看起来图像转换是一个家庭手工业。)理想情况下,我想要开源,但我会采取我能得到的。
我想要 PDF 格式的所有内容的原因是我可以使用 ReportLab 绘制出血线并向客户返回“证明” 。我使用的印刷公司也需要 PDF。
想法?建议?
Customers of my Django site can upload a print design in: PDF, PSD, AI and EPS. If the filetype they upload is not PDF I want to convert it to PDF.
So my question is: How do I convert Photoshop, Illustrator and CorelDraw files to PDF (programmatically)?
I tried UniConvertor but it: does not support PSD, distorted my AI inputs, and rejected my EPS inputs. Know any workarounds?
I am open to running separate scripts for each filetype. I googled "psd to pdf" but the results all looked like spam. (It seems image conversion is a cottage industry.) Ideally I want open-source but I will take what I can get.
The reason I want everything in PDF is so I can draw bleed lines using ReportLab and return a "proof" to the customer. Also the printing company I use requires PDF.
Thoughts? Suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Gimp 是一种支持所有这些格式并导出为 PDF 的解决方案。此外,您还可以使用 Python 编写 Gimp 脚本。
http://www.gimp.org/docs/python/index.html
听起来你可以在 Django 服务器上安装任意软件,因此只要您有权访问 X 服务器(GUI),这是可能的。
One solution that does support all of those formats, as well as exporting to PDF, is Gimp. In addition, you can script Gimp with Python.
http://www.gimp.org/docs/python/index.html
It sounds like you can install arbitrary software on the Django server, so as long as you have access to the X server (GUI) this is possible.
Photoshop 将会是一款难用的软件,Adobe Illustrator 也是如此。我不知道有任何类型的命令行实用程序可以将它们导出为 PDF。 EPS 是 Encapsulated Post Script,这意味着如果您获取 GhostScript 的副本,您可能会有一些运气。这将取决于 EPS 的创建方式,我认为充其量是不确定的。
Corel Draw,据我所知,是专有的。我知道您可以从他们的程序中将文件导出为 PDF,但我不知道有任何类似实用程序的命令可以完成相同的任务(我也曾在一家印刷公司工作过,所以我对您的格式相当熟悉)指的是)。
Photoshop is going to be a tough one, as is Adobe Illustrator. I'm unaware of any kind of command line utility that will export those to PDF. EPS is Encapsulated Post Script, meaning you may have some luck if you grab a copy of GhostScript. It'll depend on how the EPS was created though, and I'd consider it iffy at best.
Corel Draw, AFAIK, is proprietary. I know that you can export the file to PDF from within their program, but I am not aware of any kind of command like utility to accomplish the same (I also worked for a printing company, so I'm fairly familiar with the formats you're referring to).