Re: Converting pdf to eps
Yang <087y1np02 <at> sneakemail.com>
2007-12-11 22:47:34 GMT
Ralph Giles giles-at-ghostscript.com |ghostscript| wrote:
> On Tue, Dec 11, 2007 at 03:47:14PM -0500, Yang wrote:
>> ps2pdf: uses gs to produce postscript-3; results are terrible
> I think you mean this produces PDF? We don't have a Postscript level 3
> output device.
Actually, I meant pdf2ps.
I just assumed that the ps files generated by pdf2ps and convert were in
Postscript-3 since they begin with "PS-Adobe-3.0")
>> convert: identical to ps2pdf
> I believe convert just calls ghostscript, so that is to be expected.
Yeah, ImageMagick uses ghostscript, but I just wanted to point out that
the results are identical (which is not necessarily implied by the
>> ps2ps2: uses gs to produce postscript-2; for some files, the result
>> cannot be viewed in evince (errors); so far have always been able to
>> view in gs or display; seems to yield high quality as well
> Ghostscript's ps2 output is really a limited PDF output with a PDF
> interpreter written in Postscript prepended. So it will be better or
> worse depending. It's intended for printing, and doesn't currently
> produce a DSC-conformant Postscript stream.
So ps2ps2 is not useful for producing eps files (say, to be embedded in
a TeX document)?
>> Does pdftops perform lossless conversion? Does ps2ps2? They both seem to
>> produce better quality, but I'm not sure the conversion is completely
>> lossless, by which I mean I can fearlessly convert between pdf and ps
>> for ad infinitum and not worry about degradation in quality.
> Completely lossless conversion between pdf and ps (or vice versa) isn't
> possible. The best you can hope for is that they render identically, but
> even that is difficult in some cases. It's best to pick one format for
> your work and only convert to the other for printing or export.
Right, I am just hoping to render the results identically. (I'm not sure
what other definitions of equivalence could exist, since the
abstractions in both languages are incomparable, with postscript being a
Turing complete programming language.)
The bottom line is that I'm getting different results from different
tools, and I'd like to understand why.
>> Why does pdf2ps yield abysmal results? My eye tells me it's rasterizing
>> the fonts; is that true, and is that the only problem? Is there some way
>> I can tell pdf2ps to produce high-quality output/can I use ghostscript
>> to produce high-quality postscript-3? (I could find no documentation for
>> pdf2ps on the website, and the man page is minimal.)
> pdf2ps does rasterize a lot of fonts. Have you tried passing -r300 or
> -r600 and seeing if that helps?
I can increase the resolution, but I was hoping for a solution that
avoids rasterization altogether. And I'm not sure that's the only
problem; I mention it because it's the most highly noticeable.
>> Is postscript-2 inherently more verbose than postscript-3 (for
>> equivalent constructs)?
> If my postscript-3 you mean PDF, then yes, postscript level 2 is more
> verbose for some documents. It offers fewer compression options, and the
> image model is a subset, so some contents must be converted to less
> abstract representation or rasterized.
By Postscript-3 I'm referring to the language standard. AFAICT this is
> Hope that's of some help.