I'm trying to code a order printing program with delphi xe 6. And I found this code on internet
type
TPassThroughData = record
nLen: Word;
Data: array[0..255] of Byte;
end;
procedure PrintText(s: string);
var
PTBlock: TPassThroughData;
begin
PTBlock.nLen := Length(s);
StrPCopy(@PTBlock.Data, s);
Escape(Printer.Handle, PASSTHROUGH, 0, @PTBlock, nil);
end;
procedure PrintOut;
begin
Printer.BeginDoc;
PrintText(#27'&l12D' + 'Hello, World!');
Printer.EndDoc;
end;
and seams its working not like I want. It prints empty line and cuts paper and no any data on paper. I'm using IBM receipt printer type4610-1nr. And I want to ask you guys any idea how I can print data on it?