Hi, Some years ago, I encountered similar problem. My printer dont accept plain text. And it uses its own proprietary protocol (Canon LBP800). I can no longer use the simple print to LPT syntax..
The only solution was to create GIF/JPEG files from the text I wanted to print. Then use MSPaint to print it to printer as graphics. It is indeed slower but it turned out to be more flexible. Not only as I able to print text, I can also combine graphics etc.. Its been years and I now dump my printables into a PDF file, and use PDF reader to print to printer. I find that PDF is faster than creating gif files. Secondly, I can collate all what I need to print into a single PDF file.. This process requires more step than the previous one - but each has its unique advantage/disadvantages.. You may want to solve it this way. Dan On Dec 9, 2007 10:13 AM, Valerie <[EMAIL PROTECTED]> wrote: > Hello all! > > I have written a PERL/Tk program to take input from a user and to > print a report back based on the data. It works fine on my Windows > XP system with an HP Laserjet 6MP connected to a standard parallel > port (LPT1). When I copy the program to a different computer > running the same OS but with a different model HP laser printer > (model 1012) connected to the USB port, the program hangs when I try > to print. > > Can anyone help me get this program running? If it would be easier, > I could alternatively print to a standalone network > printer/copier/scanner. This might arguably be better as then the > solution could be used from any of our computers. > > Here is an excerpt of the essential part of the program. Note, the > variables, "$v1c", "$vck01" etc. are global variables and are all > valid. As I said, the program works great on my computer. > > sub vkprint { > format vkfmttop = > DAILY CASH RECONCILIATION > Denomination Qty Value Checks Credit Cards Paid > Outs > -------------------------------------------------------------------- > - > . > > format vkfmt = > @>>>>>>>>>>>@[EMAIL PROTECTED]@[EMAIL PROTECTED]@########.# > # > $text1, $text2, $text3, $text4, $text5, $text6 > . > > open LPT, '>LPT1' or die "Can't open printer: $!"; > > select LPT; > $~ = 'vkfmt'; > $^ = 'vkfmttop'; > > $text1 = "1c"; > $text2 = $v1c; > $text3 = $v1c * .01; > $text4 = $vck01; > $text5 = $vcc01; > $text6 = $poe01; > write; > > [Additional write / print commands and calculations deleted for > clarity] > > print LPT "\f"; > close LPT; > } > > > Thank you for your assistance. > > Valerie > > > > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs >
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs