Skip to content

How connect to printer? #49

Description

@sousawalker

I have a printer model TM T20X from Epson, nothing happens with this function:

(async () => {
const model = new Model('TM-T20')
const connection = new InMemory()
const printer = await Printer.CONNECT(model, connection)
await printer.setColumns(56)
await printer.write('Simple Text *** ')
await printer.writeln('Bold Text -> complete line text.[]123456', Style.Bold)
await printer.writeln('Double Height', Style.DoubleHeight | Style.Bold, Align.Center)
await printer.writeln('Double Width', Style.DoubleWidth, Align.Center)
await printer.writeln('Áçênts R$ 5,00', Style.DoubleWidth | Style.DoubleHeight, Align.Center)
await printer.feed(6)
await printer.buzzer()
await printer.cutter()
await printer.drawer(Drawer.First)
process.stdout.write(connection.buffer())
})()

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions