2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-06-12 10:15:33 +00:00

Update label.md

This commit is contained in:
Oliver
2022-03-26 16:57:54 +11:00
committed by GitHub
parent 36c0c361ab
commit 92b592857e

View File

@ -38,15 +38,18 @@ class MyLabelPrinter(LabelPrintingMixin, IntegrationPluginBase):
PLUGIN_SLUG = "mylabel"
PLUGIN_TITLE = "A dummy printer"
def print_label(self, label):
def print_label(self, label, **kwargs):
"""
Send the label to the printer
Arguments:
label: A PIL (pillow) Image file
"""
width = kwargs['width']
height = kwargs['height']
printer_backend.print(label)
printer_backend.print(label, w=width, h=height)
```