Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TVS thermal printer terminating while printing receipt #62

Open
harish8118 opened this issue Oct 4, 2022 · 1 comment
Open

TVS thermal printer terminating while printing receipt #62

harish8118 opened this issue Oct 4, 2022 · 1 comment

Comments

@harish8118
Copy link

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.

@KevinGong2013
Copy link
Owner

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants