Skip to content

Commit

Permalink
Update README to add printer response
Browse files Browse the repository at this point in the history
  • Loading branch information
MertenF committed Jul 2, 2023
1 parent d7b585f commit 8a97170
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ doc.add_body(Barcode(BarcodeType.CODE39, 'text in barcode'))

# Send the whole document to the printer
# This will automatially send a Cut at the end of the document body
printer.print(doc)
r = printer.print(doc)

# The print method returns a response element
# Here we can check if the printing was succesfull
if r.success:
print('The printing was successfull!')
else:
print(f'Printing failed. Error: {r.code}')
```


Expand Down

0 comments on commit 8a97170

Please sign in to comment.