[RFE] STR #1869: Automatic '-o raw' fornon-DSC-conformingPostScript?

Helge Blischke h.blischke at srz.de
Tue Aug 1 07:49:05 PDT 2006


John A. Murdie wrote:
>>This is a multi-part message in MIME format.
>>--------------000306010608050602020402
>>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>Content-Transfer-Encoding: 7bit
>>
>>John A. Murdie wrote:
>>
>>>[STR New]
>>>
>>>I find that the pstops filter emits PostScript which causes blank pages to
>>>be printed - one for each original page - if the input PostScript is
>>>non-Document Structure Convention conforming (see attached example file,
>>>whose first page is printed as blank simply because the application which
>>>generated the file omitted the '%%BeginProlog') - but I have other,
>>>larger,  examples which print tens or hundreds of blank pages. In some -
>>>but not all - such situations, the CUPS log file receives the message:
>>>
>>>This document does not conform to the Adobe Document Structuring
>>>Conventions and may not print correctly!
>>>
>>>The problem is fixed if one uses 'lp -o raw' or 'lpr -o raw'.
>>>
>>>Of course, if users only kept and exchanged documents in a
>>>purpose-designed portable document format, and CUPS only ever had to deal
>>>with applications which produced only DSC-conforming PostScript, then this
>>>problem wouldn't arise.
>>>
>>>We have to live in the real world, however. There are people here who have
>>>20 years of documents in PostScript, much of it non-DSC-conforming. I've
>>>hammered on at them for years to distill these into PDF files, and asked
>>>them not to pass PostScript documents to, or receive them, from external
>>>colleagues, but to use PDF instead. They don't remember. Then again, there
>>>is much application software - some no longer maintained but still useful
>>>- which produces bad PostScript. I've not looked at Microsoft
>>>Windows-produced PostScript in a while, but at one time it violated the
>>>DSCs big-time - e.g. by outputing PostScript resources on the first page
>>>that used them, so that if one printed part of the document which used the
>>>resource but not the one on which the resource was introduced, then the
>>>print failed.
>>>
>>>Unless something is done I'm going to be bothered by users of our new CUPS
>>>installation coming to me clutching piles of blank paper, demanding
>>>refunds for their printing costs and wasted time. Some of them will be
>>>angry.
>>>
>>>The only work-around I can think of is to set '-o raw' as an
>>>across-the-board default option (how would I do that?), but would it be
>>>possible instead to make `-o raw' automatic for non-DSC-conforming
>>>PostScript?
>>>
>>>Link: http://www.cups.org/str.php?L1869
>>>Version:  -feature
>>
>>Sorry, only making the job DSC conforming did not help; at the end of the original
>>prolog section there is a couple of statements (16 lines) that definitely
>>must go into the setup section in order to get through the pstops filter
>>without messing it up.
>>See the attached file - it should work (at least it does at our site).
>>
>>Helge
>>
>>--
>>Helge Blischke
>>Softwareentwicklung
>>SRZ Berlin | Firmengruppe besscom
>>http://www.srz.de
> 
> 
> Thanks for that too, Helge. The problem is, of course, that the users here produce things like this all the time (and I don't have time to fix ever bad document) and whatever print system we use should ideally detect and refuse them - i.e. encourage the users to generate only standards-conforming documents - and not print them badly, as the current pstops does. I'm hopelessly idealistic, I know.
> 
> John A. Murdie

Well, those bogus ps jobs are created by applications, and you probably
don't have more than a handfull of such applications. And, as long as the apps
write some app-specific comment line into the header section (or do some other
easily identifiable stuff), it is quite easy to both define appropriate mime types and
conversion rules and  write a small script (Perl or Python, of even PHP, if you like)
that fixes these files.

I have done this recently for PS jobs produced by dvips and xfig (fig2ps).

Let me know if you need a sample filter for your sample stuff.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups-devel mailing list