Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Delphi: Базы данных и репортинг > Как FR отчет распечатать на фискальным принтер


Автор: Salaman 10.7.2007, 12:41
Привет всем дорогие Винградцы
У меня возник вопрос как мне ФастРепорте распечатать на фискальном принтере (COM PORT),
или обычную текст блокнот пример покажите пожалуйста 
Я вот с инета  нашел такой код
Код

uses
Printers;

{ declare the "PASSTHROUGH" structure }
type TPrnBuffRec = record
BuffLength : word;
Buffer : array [0..255] of char;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Buff : TPrnBuffRec;
TestInt : integer;
s : string;
begin

{ Test to see if the "PASSTHROUGH" escape is supported }
TestInt := PASSTHROUGH;
if Escape(Printer.Handle,
QUERYESCSUPPORT,
sizeof(TestInt),
@TestInt,
nil) > 0 then begin

{ Start the printout }
Printer.BeginDoc;

{ Make a string to passthrough }
s := #13#10' A Test String ';

{ Copy the string to the buffer }
StrPCopy(Buff.Buffer, s);

{ Set the buffer length }
Buff.BuffLength := StrLen(Buff.Buffer);

{ Make the escape}
Escape(Printer.Canvas.Handle,
PASSTHROUGH,
0,
@Buff,
nil);

{ End the printout }
Printer.EndDoc;
end;
end;
 Но печатаеть только эти символы Ахххххх итд
Заранее благодарен

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)