Re: TZF - Textfile Printing
Philip Kidder <[email protected]> Tue, 13 Jan 2004 21:17:52 -0500
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Abi, Thanks for the tip but it didn't work. What did work was to use AssignFile (P, 'LPT1') instead of AssignPrn. I have to put my own formfeeds in but that is no problem since I automatically count the lines as I print. Phil ----- Original Message ----- From: "abi" <[email protected]> To: <[email protected]> Sent: Monday, January 12, 2004 9:07 PM Subject: Re: TZF - Textfile Printing > According to my manual, the command to disable Automatic line feed is Esc 5 0. > Hope this can help. > Abi > > > > > Hello Everyone, > > > > Haven't heard from anyone in awhile. Hope you all had a Merry Christmas > > and a Happy New Year. > > > > My question is with printing to two generic dot matrix printers. On is a > > regular dot matrix printer and the other is a receipt printer, my > > application uses both. > > > > I can get the the text to print but on both printers but I am getting > > two blank lines between each line of text. > > > > Here is some text code I wrote: > > > > procedure TForm1.Button1Click(Sender: TObject); > > var > > P : textfile; > > I : byte; > > CrLf : string [2]; > > > > begin > > CrLf := chr($0D) + chr ($0A); > > AssignPrn (P); > > rewrite (P); > > writeln (p, 'Line 1'); > > writeln (p, 'Line 2'); > > writeln (p, 'Line 3'); > > CloseFile (P); > > end; > > > > CrLf is left over from when I tried using write instead of writeln. > > > > Like I said the output I get is: > > ------------------------------------------------------------- > > Line 1 > > > > > > Line 2 > > > > > > Line 3 > > > > > > --------------------------------------------------------------- > > > > I have tried playing with the dip switches for Carraige return and Line > > Feed but I still get the above. > > > > If I use write and append CrLf to the end of each string I get 3 blank > > lines instead of 2. > > > > If I can solve this problem my beta tester can get to work and soon I > > can start making some money. > > > > Phil Kidder > > > > P.S. When I was writing the program I was printing to my laser printer > > and did NOT get the extra lines. > > > > > > --^---------------------------------------------------------------- This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt Or send an email to: [email protected] TOPICA - Start your own email discussion group. FREE! http://www.topica.com/partner/tag02/create/index2.html --^----------------------------------------------------------------