inventree / inventree-brother-plugin

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

Printed labels are wastefully big #41

Closed ladmanj closed 2 months ago

ladmanj commented 3 months ago

Hi I have finally found a solution how to talk to my USB Brother QL-700 from docker over tcp.

Unfortunately the labels are too big and I have not found a way how to modify it. See the attached photo. The smaller label is the optimal size for me, drawn in Gimp and sent to the printer directly via

brother_ql -m QL-700 -b network -p localhost print -l 62 stitek.png

It must have width of 696 px to not be resized by the software automaticaly.

The larger one is printed from inventree.

Can anyone help me with the configuration, please?

Thanks in advance

IMG_20240706_200554

SchrodingersGat commented 3 months ago

@ladmanj are the labels printed from the same template? They appear to be different labels

ladmanj commented 3 months ago

Hi, I mentioned it above. The smaller one is "hand-drawn" in gimp, exported to png and sent to brother_ql outside the InvenTree completely.

That is only for size comparison. That's the size i would like.

The bigger one is the smallest I can ever print out of InvenTree itself.

My English is far from perfect, so I don't know if it's described well.

Cheers Jakub

ladmanj commented 3 months ago

Maybe it's worth mentioning, that I'm completely new to InvenTree. It's my first weekend of experience what so ever.

I have no items in the database yet to print about. Only the stock locations.

J.

SchrodingersGat commented 3 months ago

Have you tried adjusting the label "width" and "height" properties in InvenTree?

For example, on the demo server:

image

ladmanj commented 3 months ago

Have you tried adjusting the label "width" and "height" properties in InvenTree?

For example, on the demo server:

image

Yes, I tried that. The printout size is always the same.

The same result as if i sent a png of 75x75 px directly to the brother_ql. If the width in pixels is smaller than the physical width of the paper, then it's automatically expanded to fit.

Unfortunately it means that the length of the final label gets also expanded (In 1:1 ratio of course).

That's unwanted so the png file must be as wide as the paper itself. 62 mm in my case, which translates to 696 px.

J.

SchrodingersGat commented 3 months ago

Yes, I tried that. The printout size is always the same.

Hmm, so the printed size is independent of any width / height setting you set?

What version of InvenTree are you running?

Unfortunately I do not have access to a printer to run any tests on, but perhaps there is an obvious bug

ladmanj commented 3 months ago

What version of InvenTree are you running?


# Version Information:
InvenTree-Version: 0.15.4
Django Version: 4.2.12
Commit Hash: fa1a9da
Commit Date: 2024-06-16

Database: postgresql Debug-Mode: False Deployed using Docker: True Platform: Linux-6.6.30-gentoo-x86_64-x86_64-with Installer: DOC

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}, {'name': 'Brother Labels', 'slug': 'brother', 'version': '0.9.0'}]


> Unfortunately I do not have access to a printer to run any tests on

I will be glad to test it for you. Just my paper supply isn't infinite.
How can I help you?
![oversized_labels](https://github.com/inventree/inventree-brother-plugin/assets/28023956/c2c9e4f2-47f8-467e-a264-761f2e4c4647)
ladmanj commented 3 months ago

Now I printed it again and suddenly it's ok. There is probably a combination of any/all of the following:

In any case I will be continuing testing and reporting.

SchrodingersGat commented 2 months ago

@ladmanj ok glad you got it working, please keep an eye out for any clues towards making this issue repeatable (so we can fix it).

For now I'll close this out, but feel free to check back in if you have any further information.