Cannot print PDF in landscape via CUPS

Paul Mather paul at gromit.dlib.vt.edu
Tue Aug 25 19:30:05 UTC 2009


I am running FreeBSD 8.0-BETA3, printing to a HP DeskJet 960C via  
ports/print/hpijs using CUPS.  Printing both locally and remotely in  
portrait mode works fine.  However, when I try to print a PDF in  
landscape mode the resultant printout appears in portrait mode with  
the edge of the printed material cut off.  This happens whether I  
submit the print job via IPP or via the command line using lpr.

Is anyone able successfully to print PDF in landscape mode using CUPS  
1.3.10 in ports?

In my case, the problem worst affects users printing from Mac OS X  
systems.  Print jobs created there are submitted to my FreeBSD CUPS  
server as application/pdf.  These seem to lose the landscape attribute  
somewhere in the subsequent filter chain on the way to the printer.   
If, on those same Mac OS X systems, I print the same output to  
PostScript (via the "Save as  PostScript..." menu in the print  
dialogue) and then print the resultant PostScript file to the FreeBSD  
print server, then the output is correct: it comes out in landscape  
format.  So, I presume the problem lies with the pdftops CUPS filter  
on the FreeBSD system.

I do not have problems printing in landscape to a directly-attached  
printer in Mac OS X.  Printing in that instance is also spooling via  
CUPS 1.3.10 running on the Mac, so it seems like Apple must have  
"fixed" their version of CUPS when it comes to landscape printing of  
PDF.

Here is the log output I get when I print a PDF file:

I [24/Aug/2009:19:36:22 -0400] [Job 16] Adding start banner page "none".
I [24/Aug/2009:19:36:22 -0400] [Job 16] Adding end banner page "none".
I [24/Aug/2009:19:36:22 -0400] [Job 16] File of type application/pdf  
queued by "paul".
I [24/Aug/2009:19:36:22 -0400] [Job 16] Queued on "DJ960C" by "paul".
I [24/Aug/2009:19:36:22 -0400] [Job 16] Started filter /usr/local/ 
libexec/cups/filter/pdftops (PID 23453)
I [24/Aug/2009:19:36:22 -0400] [Job 16] Started filter /usr/local/ 
libexec/cups/filter/pstops (PID 23454)
I [24/Aug/2009:19:36:22 -0400] [Job 16] Started filter /usr/local/ 
libexec/cups/filter/foomatic-rip (PID 23455)
I [24/Aug/2009:19:36:22 -0400] [Job 16] Started backend /usr/local/ 
libexec/cups/backend/parallel (PID 23456)
I [24/Aug/2009:19:36:45 -0400] [Job 16] Completed successfully.


Here is the log output when I print the same thing as PostScript:

I [24/Aug/2009:21:06:21 -0400] [Job 17] Adding start banner page "none".
I [24/Aug/2009:21:06:21 -0400] [Job 17] Adding end banner page "none".
I [24/Aug/2009:21:06:21 -0400] [Job 17] File of type application/ 
postscript queued by "paul".
I [24/Aug/2009:21:06:21 -0400] [Job 17] Queued on "DJ960C" by "paul".
I [24/Aug/2009:21:06:21 -0400] [Job 17] Started filter /usr/local/ 
libexec/cups/filter/pstops (PID 24506)
I [24/Aug/2009:21:06:21 -0400] [Job 17] Started filter /usr/local/ 
libexec/cups/filter/foomatic-rip (PID 24507)
I [24/Aug/2009:21:06:21 -0400] [Job 17] Started backend /usr/local/ 
libexec/cups/backend/parallel (PID 24508)
I [24/Aug/2009:21:06:54 -0400] [Job 17] Completed successfully.


Searching for bug reports of this problem yielded patches to pdftops  
that no longer apply to the version of CUPS currently in ports.   
Nowadays it appears that pdftops hands off things to Ghostscript  
instead.

Obviously, printing landscape PDF as an intermediate PostScript file  
is a workaround.  However, I would really like the pdftops CUPS filter  
on FreeBSD to "do the right thing" and handle landscape printing  
correctly.

Any help or advice on fixing this is appreciated.  I am not subscribed  
to this list so please Cc: me on any replies.

Cheers,

Paul.

PS: Here are the ports that were installed when I installed hpijs:

Information for hpijs-2.1.4_3:

Depends on:
Dependency: expat-2.0.1
Dependency: gnome_subr-1.0
Dependency: libpaper-1.1.23+nmu1
Dependency: gsfonts-8.11_5
Dependency: openldap-client-2.4.17
Dependency: python26-2.6.2_2
Dependency: perl-5.8.9_3
Dependency: png-1.2.38
Dependency: jpeg-7
Dependency: tiff-3.8.2_4
Dependency: pkg-config-0.23_1
Dependency: freetype2-2.3.9_1
Dependency: fontconfig-2.6.0,1
Dependency: pcre-7.9
Dependency: libdaemon-0.12
Dependency: gdbm-1.8.3_3
Dependency: libiconv-1.13.1
Dependency: libxml2-2.7.3_1
Dependency: dbus-1.2.4.6
Dependency: gettext-0.17_1
Dependency: libgpg-error-1.7
Dependency: libgcrypt-1.4.4
Dependency: gnutls-2.8.3
Dependency: cups-client-1.3.10_4
Dependency: cups-image-1.3.10_4
Dependency: ghostscript8-nox11-8.64_6
Dependency: glib-2.20.4
Dependency: gamin-0.1.10_3
Dependency: gio-fam-backend-2.20.4
Dependency: dbus-glib-0.82
Dependency: avahi-app-0.6.25_2
Dependency: avahi-libdns-0.6.25
Dependency: cups-base-1.3.10_4



More information about the freebsd-ports mailing list