0

长时间使用 ePOS-Print XML,通过发送带有 xml 格式报告的直接 https 请求,它可以轻松稳定地工作。

目前 xml 报告看起来像

<?xml version='1.0' encoding='utf-8'?>
<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
  <s:Body>
    <epos-print xmlns='http://www.epson-pos.com/schemas/2011/03/epos-print'>
      <text>Hello, World!&#10;</text>
      <cut type="feed"/>
    </epos-print>
  </s:Body>
</s:Envelope>

但是现在我们需要迁移到使用 ePOS SDK for Android (( 我们首先需要初始化打印机对象,然后通过 sdk 函数构建报告,然后发送到打印机。

所以我的问题是:是否可以通过 ePOS SDK for Android 将现有的 xml 格式的报告发送到打印机?我试图这样做

with(Printer(Printer.TM_M30, Printer.MODEL_ANK, AppController.appInstance)) {
  this.addText(my xml report)
  this.connect(192.168.1.1, 2000)
  this.sendData
}

报告正在打印,但就像简单的文本:(

4

0 回答 0