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

Michael Sweet mike at easysw.com
Fri Jan 14 10:55:29 PST 2005


Helge Blischke wrote:
> 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).

Actually, no, we don't want the setpagedevice commands there, we
want to eliminate this pdfSetup stuff entirely since the commands
are printer-specific.

Looks like I missed a few lines, it should just be:

     /pdfSetup {
       pop pop pop
     } def

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list