我们目前正在使用 ps2pdf
将 EPS 文件转换为 PDF。 这些 EPS 文件包含矢量信息(线条和文本)和位图数据。
然而,默认情况下,ps2pdf
将这些图像的位图组件转换为 JPG,因为它们嵌入在 PDF 中,而对于我们拥有的图形类型(数据可视化),使用它会更合适无损压缩。 PDF 支持 PNG,因此应该可以实现我们想要做的事情,但我在 有点令人生畏的手册。
所以简短的问题是:正确的写法是什么?
ps2pdf
-dPDFSETTINGS=UsePNGinsteadOfJPGcompression input.eps output.pdf
We're currently using ps2pdf
to convert EPS files to PDF. These EPS files contain both vector information (lines and text) and bitmap data.
However, by default ps2pdf
converts the bitmap components of these images to JPG as they're embedded within the PDF, whereas for the type of graphics we have (data visualisation) it would be much more appropriate to use lossless compression. PDF supports PNG, so it should be possible to achieve what we're trying to do, but I'm having trouble finding a relevant option in the somewhat intimidating manual.
So the short question is: what is the correct way to write this?
ps2pdf
-dPDFSETTINGS=UsePNGinsteadOfJPGcompression input.eps output.pdf
发布评论
评论(1)
答案是不是
-dUseFlateCompression
,因为该选项是指使用 Flate 而不是 LZW 压缩; 两者都是无损的,但 LZW 曾一度受到专利保护。 由于这不再是问题,因此该选项将被忽略。相反,为实现位图数据的无损编码而调用的选项是:(全部四个)
您可能还想对
MonoImageFilter
执行相同的操作,但我假设/CCITTFaxEncode 在那里做了合理的工作,所以它不太重要。
The answer is not
-dUseFlateCompression
, since that option refers to using Flate instead of LZW compression; both are lossless but LZW was covered by patents for a while. Since that's not a problem any more, the option is ignored.Instead, the options called to achieve lossless encoding of bitmap data are: (all four of)
You might also want to do the same thing with
MonoImageFilter
as well, but I assume/CCITTFaxEncode
does a reasonable job there so it's not too important.