Skip to content

How connect to printer? #49

@sousawalker

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())
})()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions