我正在运行一个使用Django 1.8.2的RHEL7系统作为Web服务器。 我正在研究一种解决方案,即可以通过Django API上传PostScript(PS)文件,然后将其转换为PDF或图像(如JPG或PNG)。
我提到了Django或Python,因为无论Django处理转换还是将其传递给纯Python脚本并接收返回结果都没有关系。
我一直在研究Ghostscript,但是出现了以下错误...
我提到了Django或Python,因为无论Django处理转换还是将其传递给纯Python脚本并接收返回结果都没有关系。
我一直在研究Ghostscript,但是出现了以下错误...
$ gs -sDEVICE=pdfwrite -sOutputFile=test.pdf -dBATCH -dNOPAUSE file.ps
GPL Ghostscript 9.05 (2012-02-08)
Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Regu font from /usr/share/fonts/type1/gsfonts/n022003l.pfb... 2849640 1507460 4012484 2498014 1 done.
%%[ Error handled by opdfread.ps : undefined; OffendingCommand: 9!_NGH!_NGH! ]%%
%%[STACK:
--nostringval--
14
%%]%
希望能得到任何解决方案。谢谢!
===
@KenS 感谢您指出我未能提供PS文件示例的错误。
ps2pdf
来转换 ps 文件。 - LRP