2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 05:36:46 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
```