如何在Swift中使用HOIN H58打印机打印PDF

时间:2018-09-07 17:55:59

标签: ios swift

我测试了Internet上所有可用的代码,但未找到解决方案。当我将PDF打印为数据表单时,打印机会打印随机数。

以下是用于HOIN打印机的IOS SDK(适用于ble):HOIN SDK

let ble = BLElib()
ble.connect(peripheral)

do {
      if let pdf = Bundle.main.url(forResource: "Thai", withExtension: "pdf", subdirectory: nil, localization: nil)  {
        let data = try Data(contentsOf: pdf)
       delegate.printMyData(data: data)
      }
    }
      catch { }
  }

ble.send(data)

0 个答案:

没有答案