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:
parent
36c0c361ab
commit
92b592857e
@ -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)
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user