Postscript printing issue

Helge Blischke h.blischke at srz.de
Tue Apr 10 04:42:17 PDT 2007


Leigh Koven wrote:
> Hi folks,
> 
> Really sorry to bother you with this, but our users are having a problem since
> we moved from our old RedHat 8 print server running CUPS 1.1.17 (from the looks
> of it) to our Fedora Core 6 running 1.2.7. We have a program written locally
> (which I didn't write) which generates graphs... typically large ones. The
> problem is, prior to the upgrade, the graphs would resize themselves to fit
> letter-sized paper when we printed them and now they don't. Instead we get a
> significant blow-up of the lower left-hand corner of the graph. If we have users
> print directly to the printers (using -o raw) the printers seem to handle
> resizing fine.
> Unfortunately, Postscript is pretty much greek to me. I was wondering if someone
>  who knows a lot more about this than I do could let me know if this is expected
> behavior for a file such as the one I've attached. If CUPS is doing what it
> should be doing for this file, then I need to bug the person who wrote the
> application to fix his code.
> If you need any more information from me (about cups config or the like) please
> let me know!
> 
> Thanks,
> -Leigh

The problem is that your PostScript data are NOT DSC compliant, but CUPS
depends heavily on obeying the DSC. For printing, you should modify
the generated job as follows:

(1) remove the "EPSF-3.0"
(2) After the "%%EndComments" line, insert the following lines:
	%%BeginProlog
	%%EndProlog
	%%BeginSetup
(3) Just before the "%%Page: 1 1" comment line, insert
	%%EndSetup

In this way you make sure that CUPS's pstops filter finds the comment line
it needs to properly insert the defaults from the PPD and/or the job
attributes into the respective positions.

If you cannot modify the original program for whatever reason,
you could do the mentioned modifications by a fairly simple script
(Perl or Python, or even a shell script).

Helge

-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list