Closed chitranjank closed 1 year ago
sure.
any example?
how to print multiple item in one by one dynamically? can I write (var ticket = Ticket()) for loop?
hello Kevin
use add block concept for this example: self.ticket.add(block: Block(Text(content: tipData, predefined: .bold , .alignment(.left)))) self.ticket.add(block: Block(Text(content: totData, predefined: .bold , .alignment(.left))))
let receipt = Receipt(.🖨️58(.ascii))
receipt.append(item: "dynamically")
receipt.append(item: "content" <<~ .style(.underlineMode(.enable2dot)))
receipt.append(item: Image(cgImage) <<~ .layout(.justification(.center)))
how to print multiple item in one by one dynamically? can I write (var ticket = Ticket()) for loop?