SuSE Linux: Version 8.1
In such cases, it is not even possible to force landscape format or
portrait format by using certain CUPS parameters, for example:
lp -o landscape PostScript-file
or
lp -o portrait PostScript-file
%%Orientation: Landscape
%%Orientation: Portrait
.
For example, when the PostScript code says %%Orientation: Landscape
,
the CUPS printing system rotates the printer output ninety degrees to make it suitable
for a printout on paper. This is fed to the printer in landscape orientation (long edge first).
However, if the printer output in the PostScript file has already been rotated by the
program or application to adapt it to the landscape mode so the printer output
can be printed in portrait format (short edge first), the second rotation performed by the
CUPS printing system results in the wrong orientation.
%%Orientation: Landscape
with %%Orientation: Portrait
in the PostScript code if the output in the PostScript file has already been correctly rotated
by the program or application so the printer output can
be printed on paper with portrait orientation (short edge first).
This can be done with the following sed command:
sed -e 's/Orientation: Landscape/Orientation: Portrait/' PostScript-file >PostScript-file.newThe altered PostScript file
PostScript-file.new
can now be printed with the right orientation.
To print directly from applications (e.g., Netscape), enter the corresponding printing command in the application
sed -e 's/Orientation: Landscape/Orientation: Portrait/' | lpror
sed -e 's/Orientation: Landscape/Orientation: Portrait/' | kprinter --stdinThis does not obstruct printing in portrait mode, because
%%Orientation: Portrait
remains unchanged.
UnknownPrinter: | #{lp} #owith something like
UnknownPrinter: | sed -e 's/Orientation: Landscape/Orientation: Portrait/' | #{lp} #oThe "
DefaultPrinter
" line must also be edited accordingly.
We would like to thank Mr. Willy Weisz for this information about the a2ps configuration.
The sed command can be built-in in other programs in a similar way to correct the printing output automatically. Refer to the program documentation. In any case, you can always print to a file then use the sed command on that file (provided the file's printing output is PostScript).
CUPS version 1.1.18 is an alternative solution that circumvents this problem, enabling normal printing in landscape format. The feedback on CUPS 1.1.18 has been exclusively positive so far. It already contains the security fixes that would require an update from "http://www.suse.de/en/private/download/updates/81_i386.html"
No warranty, guarantee, or support is provided for CUPS 1.1.18, because CUPS 1.1.18 includes a new version of the CUPS libraries (package cups-libs), which are required by several important programs (e.g., Ghostscript, KDE, Samba, Wine, and YaST2's printer configuration). These programs are linked to the CUPS libraries and a different version might cause some difficulties.
Problems with CUPS 1.1.18 might arise especially in connection with USB printers, because CUPS 1.1.18 uses a different type of device URI for USB printers (usb://VENDOR/MODEL?serial=...). In CUPS 1.1.18, the device URI only depends on the printer model and is no longer attached to a fixed device file (/dev/usb/lp...). For CUPS 1.1.18 and connected USB printers, see the output of /usr/lib/cups/backend/usb. It might also be necessary to adjust the device URI in /etc/cups/printers.conf. Entering the device file (usb:/dev/usb/lp...) directly should still work.
To test CUPS 1.1.18 with SuSE Linux 8.1, refer to "Testing of new CUPS versions for SuSE Linux 8.1" (http://sdb.suse.de/en/sdb/html/jsmeix_print-cups-testversion-81.html).
SDB-jsmeix_print-cups-landscape-81
)