1
0
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:
Patrick Kanzler 2023-05-09 01:16:31 +02:00 committed by GitHub
commit f4f5582583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 12 deletions

@ -1 +1 @@
Subproject commit 3612db407d02a08acd93a1540f2b4823be3f020e
Subproject commit 190a96db4b90425b99fbb4f034c04a36cf1c2bf7

View File

@ -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