in reply to Re^2: Print a text file to a Windows network printer in a landscape orientation.
in thread Print a text file to a Windows network printer in a landscape orientation.
If you're using a networked printer through the UNC path from Windows, you can probably control a PDF or ODF-compatible application on the server via OLE to do the printing. Whether that'd be easier than figuring out the detailed layout methods of Win32::Printer or getting Win32::Printer::Direct to use Win32::Printer's landscape mode I couldn't say.
In the vein of using the DOS "print" command, that works with your server's print driver IIRC, so you should be able to set all of your printers (if you have more than one) to landscape on the server. Unfortunately, portrait v. landscape settings in the driver never seem to have worked with that command. It lets you specify which printer device to print to, including UNC paths. print /d:\\unc\path filename should work. It's easy enough to share a printer with a name "foo" on the server with a name of "bar", then shell out to print /d:\\bar\foo datafile. If it did landscape, you'd really be in luck.
If you can get the file to an lpd somewhere from the Windows box, that might be worth investigating as there's an lpr for Windows (probably several). There are also lpd servers that run on Windows, for that matter.
By using a PostScript-compatible printer, a PostScript document that sets its own orientation, and either the CLI-based print command or an lpr/lpd combo, you might have a solution that way.
|
|---|