LeeC79 has asked for the wisdom of the Perl Monks concerning the following question:

I am using the following bit of code to print a file to a networked printer:
use File::Copy; $file = "fileIwantToCopy.txt"; copy ($file, '//server/printer');
It works fine except that I would like to have it print in landscape. Is this possible?

Replies are listed 'Best First'.
Re: Print Landscape
by chromatic (Archbishop) on Sep 09, 2003 at 18:14 UTC

    You have several options:

    • Run the file through an output filter (such as you might find on Unix or Cygwin) that will change it to landscape mode, then copy it to the printer.
    • Prepend a printer control language command to the file to put the printer in landscape mode. The appropriate command will depend on the make and model of the printer.
    • Create a printer queue that defaults to printing in landscape mode, then print to that instead.

    None of these solutions are Perl specific.

Re: Print Landscape
by Thelonius (Priest) on Sep 09, 2003 at 19:14 UTC
    Assuming you're on MS-Windows, you can use PrintFile to print it. It includes a command-line mode which can be used from Perl.
Re: Print Landscape
by Anonymous Monk on Sep 27, 2003 at 21:26 UTC
    You might want to turn the printer 90 degrees clockwise (or counterclockwise) and print again.