mirror of
https://github.com/python-escpos/python-escpos
synced 2025-07-15 08:43:30 +00:00
Merge branch 'master' into development
This commit is contained in:
commit
f4f5582583
@ -1 +1 @@
|
||||
Subproject commit 3612db407d02a08acd93a1540f2b4823be3f020e
|
||||
Subproject commit 190a96db4b90425b99fbb4f034c04a36cf1c2bf7
|
@ -602,19 +602,16 @@ class Escpos(object):
|
||||
)
|
||||
)
|
||||
|
||||
# Render the barcode to a fake file
|
||||
# Render the barcode
|
||||
barcode_class = barcode.get_barcode_class(barcode_type)
|
||||
my_code = barcode_class(data, writer=image_writer)
|
||||
|
||||
with open(os.devnull, "wb") as nullfile:
|
||||
my_code.write(
|
||||
nullfile,
|
||||
{
|
||||
"module_height": module_height,
|
||||
"module_width": module_width,
|
||||
"text_distance": text_distance,
|
||||
},
|
||||
)
|
||||
my_code.render(
|
||||
writer_options={
|
||||
"module_height": module_height,
|
||||
"module_width": module_width,
|
||||
"text_distance": text_distance,
|
||||
}
|
||||
)
|
||||
|
||||
# Retrieve the Pillow image and print it
|
||||
image = my_code.writer._image
|
||||
|
Loading…
x
Reference in New Issue
Block a user