SEND ESCAPE SECUENCE TO DOT MATRIX
I NEED SEND TO DOT MATRIX A ESCAPE SECUENCE, FOR CHANGE THE NUMBER LINES OF REPORT AND TOO, CHANGE THE NUMBERS OF LINES WHEN PRINTER IS CLOSE. BY DEFECT IS 40 AND THE SECUENCE FOR CHANGE IS (1B)(43)(nn) . THE PRINTER IS STAR DP8340.
THANKS
THANKS
Comments
interface
frxReport : TfrxReport;
frxDmxExp: TfrxDotMatrixExport;
dmxInitStr : string;
procedure PrintDMXreport( DMXreportName : string ); // add other parameters as required
implementation
procedure PrintDMXreport( DMXreportName : string );
begin
frxReport.LoadFromFile( DMXreportName );
dmxInitStr := <any initilization sequence>; // always start with ESC@ to reset all printer settings to default, another process may have set up the printer differently
frxDmxExp.InitString := dmxInitStr;
frxDmxExp.EscModel := 1; // as per 'printers.xml'
frxReport.PrintOptions.Printer := 'Star DP8340'; // always get actual name from Windows' printer list, always set explicitly - do not use default
frxReport.Print; // or ShowReport;
end;