Igor V. Melichev | 1 Dec 15:27 2007

Re: Getting a JPX stream's colorspace

Ralph,

> My understanding is that an ICC profile can define an
> equivalent representation of a spot color in a generic
> colorspace for preview display and proofs.

Hmm, that's not what I mean.
In general, a strongly "equivalent" isn't possible.
For example, if you take a real gold ring,
and make its image in RGB, 
you of course will get some approximation,
but for a precise rendering you'll need a gold ink.

To my knowledge ICC profiles specify something
in RGB or in CMYK but they don't help
if the printer wants to represent gold as a mix of
silver ink and yellow ink.

> I agree 2 is better, but this isn't possible with the current 
> stream-based accessors.

Not exactly. We can decode the image and send as an RGBA stream
(or CMYKA, or the like), then the stream goes to a T-like pipe,
which selects RGB (or CMYK) and A into separate streams.
The T pipe looks as a writing filter. 
I've did such thing - search for "compression_chooser"
in gs/src.

-----------------------------------

(Continue reading)

Marcos Woehrmann | 4 Dec 20:16 2007

Re: Ubuntu Gutsy does not print secured PDFs via Acroread and Ghostscript

Till,

We've found a workaround for the Ghostcript not being able to print
secured PDFs bug.

If when calling Ghostcript you replace the ' - ' argument with ' -_ '
this forces buffered reading of the input stream and allows the file
to print.

Here's a diff -c example:

*** LaserJet-6MP-foomatic.ppd.old       Tue Dec  4 11:04:07 2007
--- LaserJet-6MP-foomatic.ppd   Tue Dec  4 11:13:52 2007
***************
*** 95,101 ****
  *FoomaticIDs: HP-LaserJet_6MP hpijs
  *FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA&&
  USE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFi&&
! le=- -"
  *End

  *FoomaticRIPOption Model: enum CmdLine A 100
--- 95,101 ----
  *FoomaticIDs: HP-LaserJet_6MP hpijs
  *FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA&&
  USE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFi&&
! le=- -_"
  *End

  *FoomaticRIPOption Model: enum CmdLine A 100
(Continue reading)

Till Kamppeter | 4 Dec 20:24 2007
Picon

Re: Ubuntu Gutsy does not print secured PDFs via Acroread and Ghostscript

Marcos Woehrmann wrote:
> Till,
> 
> We've found a workaround for the Ghostcript not being able to print
> secured PDFs bug.
> 
> If when calling Ghostcript you replace the ' - ' argument with ' -_ '
> this forces buffered reading of the input stream and allows the file
> to print.
> 
> Here's a diff -c example:
> 
> *** LaserJet-6MP-foomatic.ppd.old       Tue Dec  4 11:04:07 2007
> --- LaserJet-6MP-foomatic.ppd   Tue Dec  4 11:13:52 2007
> ***************
> *** 95,101 ****
>   *FoomaticIDs: HP-LaserJet_6MP hpijs
>   *FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA&&
>   USE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFi&&
> ! le=- -"
>   *End
> 
>   *FoomaticRIPOption Model: enum CmdLine A 100
> --- 95,101 ----
>   *FoomaticIDs: HP-LaserJet_6MP hpijs
>   *FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPA&&
>   USE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFi&&
> ! le=- -_"
>   *End
> 
(Continue reading)

Marcos Woehrmann | 4 Dec 20:33 2007

Re: Ubuntu Gutsy does not print secured PDFs via Acroread and Ghostscript

Till,

Buffered reading does not store the entire file in memory; Ghostscript
reads the file in chunks of 1024 bytes.  Because of a requirement of
Ghostview (and/or GSView and/or gv) buffered reading is disabled when
using " - " with the shared object library.  The fact that Ghostscript
can't read the PostScript files generated by acroread when reading is
not buffered is something that we  plan to fix, but that bug is deep
within some i/o stream code that apparently breaks if you even look at
it funny so that's not going to happen quickly.

Ghostscript does not need random access to any PostScript file.

You are right, pstoraster would need to be patched as well; I'm not
sure what to do about the other drivers.

marcos

On Dec 4, 2007 11:24 AM, Till Kamppeter <till.kamppeter <at> gmail.com> wrote:
>
> Marcos Woehrmann wrote:
> > Till,
> >
> > We've found a workaround for the Ghostcript not being able to print
> > secured PDFs bug.
> >
> > If when calling Ghostcript you replace the ' - ' argument with ' -_ '
> > this forces buffered reading of the input stream and allows the file
> > to print.
> >
(Continue reading)

Till Kamppeter | 6 Dec 00:37 2007
Picon

Re: Ubuntu Gutsy does not print secured PDFs via Acroread and Ghostscript

Thank you very much. I have implemented the "-_" workaround in Ubuntu 
Hardy now, by patching /usr/bin/foomatic-gsrapper, 
/usr/lib/cups/filter/pstoraster, /usr/lib/cups/filter/pstopxl, and all 
/usr/bin/foo2*wrapper scripts from the foo2zjs driver suite. 
foomatic-gswrapper and the two CUPS filters I have also modified in the 
upstream repositories.

    Till

Marcos Woehrmann wrote:
> Till,
> 
> Buffered reading does not store the entire file in memory; Ghostscript
> reads the file in chunks of 1024 bytes.  Because of a requirement of
> Ghostview (and/or GSView and/or gv) buffered reading is disabled when
> using " - " with the shared object library.  The fact that Ghostscript
> can't read the PostScript files generated by acroread when reading is
> not buffered is something that we  plan to fix, but that bug is deep
> within some i/o stream code that apparently breaks if you even look at
> it funny so that's not going to happen quickly.
> 
> Ghostscript does not need random access to any PostScript file.
> 
> You are right, pstoraster would need to be patched as well; I'm not
> sure what to do about the other drivers.
> 
> marcos
> 
> On Dec 4, 2007 11:24 AM, Till Kamppeter <till.kamppeter <at> gmail.com> wrote:
>> Does Ghostscript need random access to the PostScript produces by the
(Continue reading)

Salatiel Filho | 8 Dec 18:58 2007
Picon

pstoraster crashed on signal 11

Hi guys , i don`t know if this is the right list , but i`d like to know if someone could help me.
I just bought a machine , installed DEBIAN ARM, but i can not print at all.
All needed packages are installed, but everytime i try to print i get
pstoraster crashed on signal 11.
Even trying to print a single "Test Page".

Could anyone lead me what should i do to fix it ?


--
[]'s
Salatiel

"O maior prazer do inteligente é bancar o  idiota
   diante de um  idiota que banca o inteligente".

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://www.ghostscript.com/mailman/listinfo/gs-devel
Salatiel Filho | 9 Dec 14:42 2007
Picon

Re: pstoraster crashed on signal 11

On 12/8/07, Alex Cherepanov <alexcher <at> quadnet.net> wrote:
> Salatiel Filho wrote:
> > I just bought a machine , installed DEBIAN ARM, but i can not print at all.
> > All needed packages are installed, but everytime i try to print i get
> > pstoraster crashed on signal 11.
>
> Try to reproduce the problem by calling gs directly.
> File a bug report at http://bugs.ghostscript.com
> Don't forget to attach a sample file.
>
Thanks for the answer Alex.
Here it is:
http://bugs.ghostscript.com/show_bug.cgi?id=689600

--

-- 
[]'s
Salatiel

"O maior prazer do inteligente é bancar o  idiota
   diante de um  idiota que banca o inteligente".
Yang | 11 Dec 21:47 2007
Picon

Converting pdf to eps

Hello, this is a user-level question, but I could only find this devel 
list (which from the archives seems to also deal with user issues); if 
this is not the place to ask, please kindly point me in the right direction.

Some context: I (and many others I know) frequently need to convert 
between pdf and ps, but this process has always been a mystery to 
everyone I know (and since the results are frequently less than perfect, 
it is a process that is avoided when possible). Currently, I need to 
convert a pdf to an eps for use in a tex document, so I'd like to now 
understand once and for all what is going on.

I have been searching, reading, and experimenting all day with options 
to convert from pdf to ps without losing any quality (my main goal is to 
convert to eps, but I am having difficulty even getting to the ps step). 
I have tried:

ps2pdf: uses gs to produce postscript-3; results are terrible

convert: identical to ps2pdf

pstopdf: uses xpdf; seems to be the best so far, but is it perfect?

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

The file sizes are dramatically different:

$ du -shx *
16K     convert.ps
16K     pdf2ps.ps
56K     pdftops.ps
112K    ps2ps2.ps
16K     source.pdf

I have many questions at this point, and would be grateful for answers 
to *any* of them:

What are the differences among these options?

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.

I frequently use ps2pdf with prepress settings, which as far as I 
understand means lossless conversion. Hence, another way to frame my 
original question is whether there is an equivalent option for pdf2ps.

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.)

I have not had time to try the following, but another option is to use 
the GNOME or KDE printing facilities to print to a postscript file. Can 
anyone comment on the quality of this option?

Is postscript-2 inherently more verbose than postscript-3 (for 
equivalent constructs)?

Are there other (open-source) options? How do they compare?

Thanks a lot for clearing up these issues!

Yang
Ralph Giles | 11 Dec 21:59 2007

Re: Converting pdf to eps

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.

> convert: identical to ps2pdf

I believe convert just calls ghostscript, so that is to be expected.

> 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.

> 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.

> 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?

> 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.

Hope that's of some help.

 -r
Yang | 11 Dec 23:47 2007
Picon

Re: Converting pdf to eps

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 
former statement).

> 
>> 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 
not PDF....

> 
> Hope that's of some help.
> 
>  -r

Thanks,

Yang

Gmane