POS 打印机 MatrixPoint MP-3250 ESC/POS 命令

发布于 2024-10-26 12:34:06 字数 1568 浏览 1 评论 0原文

作为主题,我有一台 POS 打印机 MatrixPoint MP-3250。 正如手册所说,它支持命令:ESC/POS 兼容

我确实搜索谷歌,尝试过但不起作用。至少设置压缩字体、粗体、斜体和剪纸命令。

运行规格:

  1. Windows 7 32bit
  2. 打印机接口为并口插槽,我用的是BAFO并口 至 USB 适配器。
  3. 安装BAFO的驱动程序后,我们得到:USB001 - Virtual USB 打印机端口
  4. 我在“设备和打印机”中手动添加打印机(添加本地 打印机,设置为 USB001 端口并使用通用/纯文本打印机 司机。
  5. 发送命令
  6. 我使用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:

  1. Windows 7 32bit
  2. The printer interface was Parallel slot, I use BAFO parallel
    to USB adapter.
  3. After the BAFO's driver installed, we got: USB001 - Virtual
    printer port for USB
  4. I add the printer manually in "Devices and Printers" (add local
    printer, set to USB001 port and using Generic / Text only printer
    driver.
  5. I send command using winspool APIs (WritePrinter)
  6. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晚风撩人 2024-11-02 12:34:06

您的剪切命令发出错误。

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.

一刻暧昧 2024-11-02 12:34:06

案件结案。我最后的怀疑是对的,问题是 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文