|
Lines 67-75
sub NetworkPrint {
Link Here
|
| 67 |
# set the queue to "file" (or " file", if real queues aren't allowed |
67 |
# set the queue to "file" (or " file", if real queues aren't allowed |
| 68 |
# to have spaces in them). Or perhaps if $queue eq "" and |
68 |
# to have spaces in them). Or perhaps if $queue eq "" and |
| 69 |
# $env->{file} ne "", then that should mean "print to $env->{file}". |
69 |
# $env->{file} ne "", then that should mean "print to $env->{file}". |
|
|
70 |
|
| 71 |
my $fh; |
| 70 |
if ( $queue eq "" || $queue eq 'nulllp' ) { |
72 |
if ( $queue eq "" || $queue eq 'nulllp' ) { |
| 71 |
return; |
73 |
return; |
| 72 |
#open( PRINTER, ">/tmp/kohaiss" ); |
74 |
#open( $fh, ">/tmp/kohaiss" ); |
| 73 |
} |
75 |
} |
| 74 |
else { |
76 |
else { |
| 75 |
|
77 |
|
|
Lines 77-91
sub NetworkPrint {
Link Here
|
| 77 |
# This is a reasonable assumption, but only because every other |
79 |
# This is a reasonable assumption, but only because every other |
| 78 |
# printing package has a wrapper script called 'lpr'. It'd still |
80 |
# printing package has a wrapper script called 'lpr'. It'd still |
| 79 |
# be better to be able to customize this. |
81 |
# be better to be able to customize this. |
| 80 |
open( PRINTER, "| lpr -P $queue > /dev/null" ) |
82 |
open( $fh, "-|", "lpr -P $queue > /dev/null" ) |
| 81 |
or die "Couldn't write to queue:$queue!\n"; |
83 |
or die "Couldn't write to queue:$queue!\n"; |
| 82 |
} |
84 |
} |
| 83 |
|
85 |
|
| 84 |
# print $queue; |
86 |
# print $queue; |
| 85 |
#open (FILE,">/tmp/$file"); |
87 |
#open (FILE,">/tmp/$file"); |
| 86 |
print PRINTER $text; |
88 |
print $fh $text; |
| 87 |
print PRINTER "\r\n" x 7 ; |
89 |
print $fh "\r\n" x 7 ; |
| 88 |
close PRINTER; |
90 |
close $fh; |
| 89 |
|
91 |
|
| 90 |
#system("lpr /tmp/$file"); |
92 |
#system("lpr /tmp/$file"); |
| 91 |
} |
93 |
} |
| 92 |
- |
|
|