Ciao, ho trovato (grazie Alka) una funzione che mi permette di mandare delle sequenze di escape alla stampante. Il problema è che l'esempio che ho io è per win 32 e logicamente alcune funzioni non girano con Delphi.net.
in particolare la StrPcopy. Qualcuno sa darmi qualche idea su come sostituirla? Grazie.
codice:
type TPrnBuffRec = record
BuffLength : word;
Buffer : Array [0..255] of char;
end
var F : TextFile;
var Str : string;
Procedure PrintLine(s : string);
var Buff : TPrnBuffRec;
TestInt : Integer;
begin
TestInt := PASSTHROUGH;
if Escape(Printer.Handle, QUERYESCSUPPORT, sizeof(TestInt), @TestInt, nil ) > 0 then
begin
Printer.BeginDoc;
s := #27 + 'W1'+ 'A test string ' + #27 + #10 + ' Ciao Ciao';
StrPCopy(Buff.buffer, s);
Buff.BuffLength := StrLen(Buff.buffer);
Escape(Printer.Canvas.Handle, PASSTHROUGH, 0, @Buff, nil);
printer.EndDoc;
end;
end;