Landscape Printing Broken on MacOSX

Helge Blischke h.blischke at srz.de
Sat Mar 19 07:29:14 PST 2005


Hugh Caley wrote:
> 
> Helge, here is an example of the landscape problem on MacOSX.
> 
> http://loomer.com/landscape-d03751-001
> 
> Thanks,
> 
> Hugh
> 
> > Hugh Caley wrote:
> > >
> > > > Hugh Caley wrote:
> > > > >
> > > > > When I set up my MacOSX machines to get our printer list from the CUPS server automatically (with the ServerName and BrowsePoll settings) they can print, but not in landscape mode.  If I manually set up the printers they work fine (using lpd).
> > > > >
> > > > > CUPS version is 1.1.17 on RedHat 8.  MacOSX version is 10.3.8.
> > > >
> > > > Post (an URL to) a sample file that does not print as expected.
> > > >
> > > > Helge
> > >
> > > Hi, Helge.  No particular page; I just fire up Safari, Firefox or TextEdit on MacOSX and attempt to print landscape to a printer on the CUPS server; it always comes out portrait.  The margins are also wrong (the text disappears into the right margin) so I'm guessing that the page orientation command isn't working, but the actual formatting is OK?  I notice that the "Preview" seems to look good but prints portrait as well.
> > >
> > > Hugh
> > >
> >
> > I cannot nail dows the issue until I can have a look into a sample
> > (because
> > PostScript is a progamming language and there are many ways to do
> > landscape
> > printing right or wrong).
> > To generate a sample, you may stop the printer (via lpadmin or the CUPS
> > web interface), print something as usual, and then save the "dnnnnn"
> > (where nnnnn is the CUPS jub number) file out of the CUPS spool
> > directory to a safe location and post (an URL to) that.
> >
> > Helge
> >

Thanks for the sample. I guess I have an idea what is going wrong whith
that PDF file.
For both pages of the sample file, the PDF contains

/MediaBox [ 0 0 792 612 ]

which is clearly landscape orientation (width is greater than height).
But the default
pdftops filter of CUPS gets the page size (i.e. the media size to print
on) from the
PPD the printer is configured with - it uses the PPD defined default
page size (or,
if that isn't defined, an internally defined common section of A4 and
Letter).
Thus the PDF's media size is overwritten by what CUPS thinks to be the
default
which presumably is in portrait orientation.

As a workaround, try to add the "-o landscape" option (don't know how
you add
printing options from within MacOS X), or explizitely specify the
correct media
size.

If you can get or compile the pdftops utility from the xpdf 3.0 suite,
you may
get the "alternate pdftops filter" from the CUPS' links section and use
that.
The proposed configuration file forces the page size to the PDF's media
box.

Helge

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




More information about the cups mailing list