[gs-devel] Ubuntu Gutsy does not print secured PDFs via Acroread and Ghostscript

Marcos Woehrmann marcos.woehrmann at artifex.com
Tue Dec 4 11:33:57 PST 2007


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.
> >
> > 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
> >
> >
> > I realize this is not a trivial fix, since there are many .ppd files
> > that will need to be changed, but it's the best we can do at the
> > moment.
>
> I can do this globally via the foomatic-gswrapper,
> but this will only help for foomatic-rip integrated drivers. I could
> also patch pstoraster for CUPS raster drivers, but there is still the
> problem that some drivers bring their own Ghostscript wrappers. In
> addition, what does buffered reading mean? Does it mean that the whole
> job is stored in a temporary file? This could require much disk space on
> big jobs.
>
> Does Ghostscript need random access to the PostScript produces by the
> new Adobe Reader?
>
>     Till
>



-- 
Marcos H. Woehrmann   marcos.woehrmann at artifex.com


More information about the gs-devel mailing list