POS 打印机 MatrixPoint MP-3250 ESC/POS 命令
作为主题,我有一台 POS 打印机 MatrixPoint MP-3250。 正如手册所说,它支持命令:ESC/POS 兼容
我确实搜索谷歌,尝试过但不起作用。至少设置压缩字体、粗体、斜体和剪纸命令。
运行规格:
- Windows 7 32bit
- 打印机接口为并口插槽,我用的是BAFO并口 至 USB 适配器。
- 安装BAFO的驱动程序后,我们得到:USB001 - Virtual USB 打印机端口
- 我在“设备和打印机”中手动添加打印机(添加本地 打印机,设置为 USB001 端口并使用通用/纯文本打印机 司机。
- 发送命令
- 我使用winspool API(WritePrinter) Delphi XE
请帮助我,任何评论将不胜感激。
我尝试使用这个 ESC/POS手册。
编辑。
方法如下:
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
我们在印刷纸上得到的内容: OWOTOFT打印到默认打印机(出现奇怪的字符)
纸张无法剪切(没有发生)
编辑: 大多数人忘记了,上述内容在 Epson 兼容/IBM 9068A 存折打印机(点阵)上运行良好。 (不确定)打印机直接连接到 USB/并行端口,而不是使用适配器(像现在一样并行到 USB)。
我认为该适配器或其驱动程序内部/之间有问题?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的剪切命令发出错误。
GSv0 分为:
GS(组分隔符)#29
v 是小写的“v”
0 二进制值零 #0
这应该可以进行切割。
Your cut command is send out wrong.
The GSv0 is split into:
GS (group seperator) #29
v that is the lower case 'v'
0 the binary value zero #0
This should make the cut.
案件结案。我最后的怀疑是对的,问题是 BAFO - 并行 USB 适配器。唉,因为这个半工作适配器(不兼容),我花了很多时间。通过更换为其他类型/分支适配器,它现在可以正常工作。
感谢所有贡献者
Case closed. My final suspect was right, the problem was BAFO - Parallel to USB adapter. Siggh, I spending a lot of time because of this semi working adapter (incompatible). By replacing with another type/branch adapter it is now works fine.
Thank you to all contributors