Dear all,

How to send escape sequence code to a dot matrix printer ?
(Epson LX-300+)

I used the code below, but it does not run:
-draft is not set on the printer
-left margin is not set 
-right margin is not set
-12 CPI is not set

-text is printed, but not under expected formatting.
-text is printed using formatting from printer-hardware,
  not from the software.

-------------
-Paralel port LPT1
-Windows XP

-------------
//(memos is a TMemo)
//(escape-codes come from Epson's User Manual)

var
  escInit: String = #27'@';

  //select n/72 inch line spacing + n
  escLeftMargin: String = #27'l1';       // left margin 1 kolom
  escRightMargin: String = #27'Q1';      // right margin 1 kolom

  escSetDraft: String = #27'x0';         //draft mode
  escSetNLQ: String = #27'x1';           //NLQ mode

  escSelect10CPI: String = #27'P';       // 10 cpi
  escSelect12CPI: String = #27'M';       // 12 cpi

begin
  AssignFile(Output, 'LPT1');
  Rewrite(Output);

  Write(Output, escInit);
  Write(Output, escSetDraft);
  Write(Output, escLeftMargin);
  Write(Output, escRightMargin);
  Write(Output, escSelect12CPI);

  Write(Output, memos.Text);

  CloseFile(Output);
end;
-------------

Is there something wrong, or is there another way?

TIA, GBU
/silo.w
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to