Mac Landscape mode, the future of cups?

Jim Deas jim.deas at warnerbros.com
Fri Feb 20 16:41:33 PST 2009


> Jim Deas wrote:
> > Got it. Time to write a filter....
> > I.E.
> > -----------------------------------------------
> > File of type application/pdf queued by "jdeas".
> > Queued on "BLD150-256" by "jdeas".
> > Started filter /usr/lib/cups/filter/pdftops (PID 7036)
> > Started filter /usr/lib/cups/filter/pstops (PID 7037)
> > Started filter /usr/lib/cups/filter/pstoraster (PID 7038)
> > Started filter /usr/lib/cups/filter/rastertogutenprint.5.0 (PID 7039)
> > Started backend /usr/lib/cups/backend/socket (PID 7040)
> > Completed successfully.
> > ------------------------------------------------
> >
> > The Mac is sending pdf, from what I have read the printer is doubling up the rotation by sending a postscript rotate command to the printer (two rotations).
> > The que ppd looks like a good place for prefilters but I need  a ps post filter.
>
> You want to replace the pdftops/pstops combo with your own filter.
>
> > Where do I tell the cups system to insert a post filter?
> > Shouldn't a simple script to change any ps reference from landscape to portrait 'patch' the problem?
> >
> > Day one at this, am I going down the wrong path?
>
> Make a "jimpdftops" filter in /usr/lib/cups/filter:
>
>      #!/bin/sh
>      options="`echo $5 | sed -e '1,$s/orientation-requested=[0-9]+//' -e
> '1,$s/landscape//'`"
>      pdftops "$1" "$2" "$3" "$4" "$options" $6 | pstops "$1" "$2" "$3"
> "$4" "$options"
>      exit $?
>
>
> Make a "jim.convs" filter in /etc/cups:
>
>      application/pdf application/vnd.cups-postscript 1 jimpdftops
>
> Restart cupsd:
>
>      sudo killall -HUP cupsd
>
>
> --
> ______________________________________________________________________
> Michael R Sweet                        Senior Printing System Engineer
>
Michael,
 Thanks for the info. I changed the sed command to 'orientation-requested=4//'
and things started working well. We have several generations of HP I will test this with on Monday.

Thanks again for the help
JD




More information about the cups-devel mailing list