as the subject, I have a POS printer MatrixPoint MP-3250. As the manual said it is support command: ESC/POS compatible
I do search google, tried but won't works. At least setting condensed fonts, bold, italic and cutting paper command.
Running specifications:
- Windows 7 32bit
- The printer interface was Parallel slot, I use BAFO parallel to USB adapter.
- After the BAFO's driver installed, we got: USB001 - Virtual printer port for USB
- I add the printer manually in "Devices and Printers" (add local printer, set to USB001 port and using Generic / Text only printer driver.
- I send command using winspool APIs (WritePrinter)
- Delphi XE
Please help me out, any comments will appreciate.
I tried using this ESC/POS manual.
EDIT.
Here is how:
function WriteToPrinter(const Data: string): DWord;
var Temp: AnsiString;
begin
// write directly to printer device
{ ----
Note:
This method is also able to send Escape command sequences directly,
so you're no longer need to call Win32 API complicated Escape() function.
}
// We need convert to raw string since I'm using Delphi XE
// string = UnicodeString
Temp := AnsiString(Data);
Result := 0;
if (fPrnStatus = rpsPageStarted) then
WritePrinter(fPrnHandle, PAnsiString(Temp), Length(Temp), Result);
end;
WriteToPrinter(#27'@'); // init printer
WriteToPrinter(#27'S'); // normal mode?
WriteToPrinter('Printing to default printer.'); // data
WriteToPrinter('GSV0'); // Cut the paper
What we got on printed paper: OWOTOFTPrinting to default printer (strange characters appear)
The paper failed to cut (notting happend)
EDIT: Mostly forgot, the above stuff working fine on Epson compatible / IBM 9068A Passbook Printer (Dot matrix). (not sure) the printer connected directly to USB / Parallel port, not using adapter (Parallel to USB like now).
I supposed something wrong in/between this adapter, or its drivers?
Thank you