TZF - Textfile Printing
[email protected] Mon, 12 Jan 2004 22:16:54 +0000
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
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
--^----------------------------------------------------------------