
* Merge software and hardware barcodes to one method * Fix wrong sw barcode heigh/width * Add missing param to _sw_barcode call * Make barcode() smarter, improvements and clean up * Use param font_size in sw_barcode() * Update docstrings * Update barcode examples and docs * Add --force_software option to CLI * Attempt to match the sw and hw barcode sizes * Better approximation to native font size * Fix docs build * Update tests at test_function_softbarcode * Fix exception * Move image dpi setting to writter_options * Fix _sw_barcode() docstring param * Fix wrong default param in docstring * improve linkage in documentation --------- Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com> Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
10 lines
255 B
Python
10 lines
255 B
Python
from escpos.printer import Usb
|
|
|
|
|
|
# Adapt to your needs
|
|
p = Usb(0x0416, 0x5011, profile="POS-5890")
|
|
|
|
# Some software barcodes
|
|
p.barcode("Hello", "code128", width=2, force_software="bitImageRaster")
|
|
p.barcode("1234", "code39", width=2, force_software=True)
|