[cups.development] cups filter Xpdf/pdftops seems to produce

Helge Blischke h.blischke at srz.de
Fri Jan 14 06:56:28 PST 2005


hans lux wrote:
> 
> Helge Blischke wrote:
> 
> >hans lux wrote:
> >
> >
> >>hi there,
> >>
> >>i downloaded and compiled the latest cups version 1.2.x.
> >>i was actually only interested in the pdftops filter.
> >>
> >>when applying the filter to an arbitrary pdf file
> >>like
> >>
> >>./pdftops 1 2 3 4 5 foo.pdf > out.ps
> >>
> >>and sending it to the printer,
> >>i get the following error:
> >>
> >>ERROR: VMerror
> >>OFFENDING COMMAND: pdfSetup
> >>
> >>STACK:
> >>
> >>and that's it.
> >>
> >>note: this error doesn't occur when i apply pdftops in version 2.01 and 2.03
> >>and not in the command line version that comes mit Xpdf.
> >>
> >>can anyone attest this error ?
> >>
> >>hlux
> >>
> >>
> >
> >Post (an URL to) a sample PostScript file that produces this error.
> >
> >Helge
> >
> >
> >
> here you go
> 
> http://www.metawire.org/~c42/cups/

The filter (pdftops300) seems to be broken. Near the beginning of the PS
file, 
there is the code:
---snip---
/pdfSetup {
  3 1 roll 2 array astore
  /setpagedevice where {
  pop pop pop
} def
---snip---
which is definitely bogus.
It will produce PostScript errors in an unpredictable way (depending on
how the 
PS interpreter's scanner does read ahead etc.).
 
It should read instead:
---snip---
/pdfSetup {
  3 1 roll 2 array astore
  /setpagedevice where {
    pop 3 dict begin
      /PageSize exch def
      /ImagingBBox null def
      /Policies 1 dict dup begin /PageSize 3 def end def
      { /Duplex true def } if
    currentdict end setpagedevice
  } {
    pop pop
  } ifelse
} def
---snip---
(which is produced by the original pdftops utility from the Xpdf suite).

To solve your specific problems, you may have a look at the pdftops
wrapper (see
"alternate pdftops filter" on the CUPS site's link section).

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
tel: +49 30 75301-360




More information about the cups-devel mailing list