Open harish8118 opened 1 year ago
Printer
framework has been rewrite.
Paster your receipt in this issue.
eg:
let receipt = Receipt(.init(maxWidthDensity: 500, fontDesity: 12, encoding: .utf8))
<<~ .style(.initialize)
<<~ .page(.printAndFeed(lines: 3))
<<~ .layout(.justification(.center))
<<< Dividing.`default`()
<<~ .style(.underlineMode(.enable2dot))
<<< "Testing"
<<< KV("k", "v")
<<~ .style(.clear)
<<< Image(cgImage, grayThreshold: 28)
<<< Dividing.`default`()
<<~ .page(.printAndFeed(lines: 0))
<<~ .style(.initialize)
<<< QRCode(content: "https://www.yuxiaor.com")
<<~ .cursor(.lineFeed)
<<< Command.cursor(.lineFeed)
<<~ .cursor(.lineFeed)
TVS thermal printer terminating while printing receipt in Swift code. It was able to print only header details, then printing terminating and get shut down. Help me out from this issue.