inventree / inventree-brother-plugin

Label printing plugin for Brother series printers
MIT License
16 stars 12 forks source link

Die-cut labels only want to print in portrait orientation #26

Closed chris-thorn closed 11 months ago

chris-thorn commented 1 year ago

Hi there,

I've just obtained a Brother QL-810Wc wireless label printer and I'm trying to get it to print 17mm x 54mm die-cut labels, but instead of looking like this:

image

they're coming out like this:

image

I've tried setting the rotation angle in the plugin, but all come out basically the same.

This is the CSS and HTML for my label:

{% block style %}

.qr {
    display: block;
    height: 17mm;
    width: 17mm;
    position: fixed;
    left: 0mm;
    top: 0mm;
}

.part {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 7pt;
    display: block;
    overflow: hidden;
    position: absolute;
    left: 18mm;
    top: 0mm;
}

{% endblock style %}

{% block content %}

<img class='qr' alt="{% trans 'QR Code' %}" src='{% qrcode qr_data %}'>

<div class='part'>
    {{ part.full_name }}
</div>

{% endblock content %}

These are the plugin settings:

image

These are my label settings:

image

For reference, I've been able to print labels absolutely fine using a 38mm continuous label roll, with the height of each label configured to be 19mm. I wanted to switch to the die-cut labels because the sharp corners of the labels cut from a continuous roll keep getting snagged and the labels begin to peel.

I just wondered if this was something anyone had encountered before with this plugin, or is it something to do with my setup?

Thanks for reading!

Chris

rieders commented 12 months ago

Hello I had the same problem in https://github.com/inventree/inventree-brother-plugin/issues/23

communicated. Unfortunately the request was closed although the problem persists. I am currently printing to pdf output. It would be nicer if it would go directly to the printer. Oliver had made changes. but he couldn't test it himself because he didn't have a QL 820NWB. Greetings

chris-thorn commented 12 months ago

Oh, I can't believe I didn't find your issue - I thought I tried all likely search terms, but must have not noticed yours in the results!

Anyway, yes, that seems to be exactly the same as what I'm experiencing.

I find that setting the rotation to 180° does make it come out rotated 180°, but the 90° and 270° options do nothing.

I appreciate these types of problem must be tricky to troubleshoot when one doesn't have the hardware available for testing.

Chris

SchrodingersGat commented 12 months ago

@chris-thorn @rieders do you have any ability to test some ideas locally with your hardware? Looking through the code, there may be a double rotation which is causing this problem.

I can suggest some changes for you to try - you'll need command line access / admin access to your InvenTree installation, so that you can run some tests locally

chris-thorn commented 12 months ago

I can certainly have a go! FYI I am running InvenTree in Docker:

# Version Information:
InvenTree-Version: 0.13.0 dev
Django Version: 3.2.20
Commit Hash: af14cef
Commit Date: 2023-08-08

Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-5.10.0-23-amd64-x86_64-with
Installer: DOC

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'Brother Labels', 'slug': 'brother', 'version': '0.7.1'}]
SchrodingersGat commented 12 months ago

@chris-thorn @rieders please try to update your plugin to 0.7.2 - I hope this fixes it, but again no hardware to test locally... LMK how you go

rieders commented 12 months ago

Hello Oliver

Many thanks for your effort. Now it works perfectly with my Brother QL-820NWB.

I have under root

cd /opt/inventory source ./env/bin/activate pip install -U inventory-brother-plugin sudo reboot

executed.

Greetings

SchrodingersGat commented 12 months ago

Great! @chris-thorn LMK how you go too. I'll leave this open for a few days for any feedback

chris-thorn commented 12 months ago

Hi Oliver,

Sorry for the delay! Thanks for updating the plugin, I will test tonight and report back!

Best regards,

Chris

chris-thorn commented 11 months ago

Finally got round to testing it and I'm delighted to report that it now works well with 17x54mm die-cut labels - thanks very much for your help!

Chris