On 3/20/2003 6:13 PM, Sivakumaran Raman wrote:
I am sending output to a printer using the following method:
sysopen( PRINTER, "//TOSHIBA-Siv/My_Printer", O_WRONLY ) or die( "Failed to open
PRINTER\n" );
print PRINTER @completefile ;
close( PRINTER ) or die("Cannot close file\n");
I have also set $| to 1 at the top of the Perl script to enable auto-flushing behavior.
My problem is that the print job sits in the printer queue and I have to hit the reset button on the printer to print stuff out. I understood that I had to find some way to empty out the buffer (similar to the sync() function in C). I did a search and found the File::Sync module but the problem is that this is not available for Win32. How can I get the printer queue to empty out on Windows? I am on Windows XP Professional.
Any ideas?
Thanks in advance,
Siv Raman
sysopen( PRINTER, "//TOSHIBA-Siv/My_Printer", O_WRONLY )
or die( "Failed to open PRINTER\n" );
print PRINTER @completefile ;
print PRINTER "\f"; # <-- [FF] Form-Feed
close( PRINTER ) or die("Cannot close file\n");
--
A little learning is a dang'rous thing;
Drink deep, or taste not the Pierian spring;
There shallow draughts intoxicate the brain;
And drinking largely sobers us again.
- Alexander Pope
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs