Closed corytodd closed 2 years ago
@corytodd This solves the issue. Every ticket prints correctly now in the test application sent by the customer.
We may want to add documentation that makes it clear that PrintDocument() handles sending the form feed command, as the test application does the following:
_printer.PrintDocument(document);
_printer.FormFeed();
where only the first statement is necessary with the new changes in this PR.
In this changeset we are attempting to reduce the amount of calls to the serial port write function. The idea is to build up the document in a buffer backed by a MemoryStream stream. Then, on FormFeed, we will write the entire buffer to the printer in one operation.
What do you think of this approach?