in reply to How to send output from a Perl script to the printer
I think more details are going to be needed to answer this question. Chief among them are:
The UNIX world is used to the BSD printing system; Net::Printer is capable of speaking to that system only (as things currently stand). Odds are better than even that if your printer is attached to a *nix system (e.g. Linux, *BSD, Solaris) that system is running a version of BSD lpr (or at least something that can grok it). My experience with recentish HP standalone networked printers is that their builtin printer server software groks BSD lpr, so you may already be a winner with Net::Printer in these cases.
SMB is the protocol by which a Windows system shares its printer, so if your printer is attached to a Windows system, you'll have to go through SMB at some point. You can ease the pain pretty quickly, though, if you're running a *nix flavor: with Samba (distributed with most *nices today), you mount the remote printer as if it were any other networked printer; all you do once the system's set up is pump your script's output to the right printer with
cat filename | lpr -P[printername]
Finally, if you're on Windows and the printer is also attached to a windows system ... well, here I'm not so sure, 'cos I don't use Perl on Win32 ... I looked through the available modules, but none seemed particularly well suited to the task. You might look into using Win32::OLE, but that seems (a) indirect and (b) like swatting a fly with a sledgehammer.
HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|