Skip to content

Conversation

@Bennik2000
Copy link

This PR exposes the flush() method of the underlying socket. The flush() function should be used before disconnecting in order to send all buffered printing commands to the printer. Under some circumstances (long print jobs, slow network, ...) the printer may not be done printing before a disconnect. Then the last few lines are not printed and the paper may not get cut.

Usage of the exposed flush() method:

await printer.flush();
printer.disconnect();

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant