使用ZXingObjC生成2D数据矩阵图像

时间:2019-01-28 12:38:54

标签: ios swift barcode datamatrix zxingobjc

ZXingObjC不以ECC200格式编码内容字符串。当我扫描图像时,它显示相同的内容字符串。它不会在结果图像扫描中隐藏消息标题“ []>〜d030”,组分隔符“〜d029”,记录分隔符“〜d030”和endOfTransmisson“〜d004”。

let hints = ZXEncodeHints() as ZXEncodeHints
hints.encoding = 1
hints.dataMatrixShape = ZXDataMatrixSymbolShapeHintForceSquare
hints.margin = 0.02

let writer = ZXMultiFormatWriter()
let matrixCodeString = "[)>~d03005~d02980040614141ABC123456~d030~d004"

let result = try? writer.encode(matrixCodeString, format: kBarcodeFormatDataMatrix, width: 120, height: 120, hints: hints)

谢谢...

0 个答案:

没有答案