michaelrsweet / lprint

A Label Printer Application
https://www.msweet.org/lprint
Apache License 2.0
219 stars 29 forks source link

Left Margin on Dymo LabelWriter 450 #49

Closed jrperk closed 1 year ago

jrperk commented 2 years ago

I am very close to creating a barcode label kiosk using lprint and a raspberry pi 400 running Buster. This is a giant leap from the 8 second delay that CUPS creates betweeen jobs. No matter what settings I use, it appears that lprint is attempting to center the label across the entire width of the dymo printer. This printer has a maximum label width of about 2.5 inches. When you load a smaller label, you cannot center it in the carriage. You have to left-align the roll. If I print a larger label size, it still attempts to center it across the entire carriage. I am printing 1x1 labels and I only get about the left 1/8" of the image on the label. Everyting else is hanging off to the right. I understand this uses the cups 1/100mm measurements for margins but I can't figure out how to change them as -o options and the current ones in .lprint.conf don't match what I am seeing on the paper. I apologize if this issue is covered somewhere else. I can't seem to find anything about it in the documentation, man pages, cups programming manuals, etc.

michaelrsweet commented 2 years ago

@jrperk What do you have the loaded media set to? The default media is the 3.5x1.25" address label, but since the DYMO printers lack any sort of media sensing capability you need to make sure to manually configure what you have loaded in the printer.

You can configure the loaded media to the 1x1 square labels at the command-line with:

lprint modify -d PRINTER-NAME -o media-ready=oe_square-multipurpose-label_1x1in -o media=oe_square-multipurpose-label_1x1in

Similarly, if you go to the web interface (typically on port 8000 for a Pi) then you can click on the "Media" button and choose the loaded media.

jrperk commented 2 years ago

I did the label change but I didn't start the server yet so I will try it that way.

On Mon, Jan 3, 2022, 11:36 AM Michael R Sweet @.***> wrote:

@jrperk https://github.com/jrperk What do you have the loaded media set to? The default media is the 3.5x1.25" address label, but since the DYMO printers lack any sort of media sensing capability you need to make sure to manually configure what you have loaded in the printer.

You can configure the loaded media to the 1x1 square labels at the command-line with:

lprint modify -d PRINTER-NAME -o media-ready=oe_square-multipurpose-label_1x1in -o media=oe_square-multipurpose-label_1x1in

Similarly, if you go to the web interface (typically on port 8000 for a Pi) then you can click on the "Media" button and choose the loaded media.

— Reply to this email directly, view it on GitHub https://github.com/michaelrsweet/lprint/issues/49#issuecomment-1004247336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYJTJ2XG5SXOGEQ2BKBR4DUUHNBJANCNFSM5LENE4ZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

jrperk commented 2 years ago

I did a fresh OS install.

When I used your lprint modify command, it gave an error message: lprint: Unable to modify printer: Attribute groups are out of order (2 < 4).

I had to start the server and change the media size via the web interface.

The test page is too big to print on a 1x1 label so I couldn't test that.

I lied and told the web interface that I loaded a wider label. It still didn't left-align (where the labels start).

I tried setting the labels to 2.5 x 1 inch labels and sending a 750 x 300 dpi PNG with lprint and had the same results. It starts about 7/8 inches from the left side of the labels.

I loaded 1.128" x 3.4374" address labels and the test print also printed 3/4" too far to the right no matter which scaling option I chose.

The .lprint.conf file only shows a left margin of 100.

The setting portion of the .lprint.conf file is:

DNSSDName LPrint Contact DefaultPrinterID 1 NextPrinterID 2 UUID urn:uuid:3ddc9a09-8ebd-3918-60ba-2110bc35b3ff <Printer did="MFG:DYMO;MDL:LabelWriter 450;CMD:PWG,URF,application/vnd.dymo-lw,application/vnd.lprint-test,JPEG,PNG;" driver="dymo_lw-450" id="1" name="kioskdymo" uri="usb://DYMO/LabelWriter%20450?serial=01010112345600"> DNSSDName kioskdymo Contact MaxActiveJobs 0 MaxCompletedJobs 100 NextJobId 28 ImpressionsCompleted 16 media-col-default bottom="525" left="100" length="2540" name="oe_square-multipurpose-label_1x1in" right="100" source="main-roll" top="525" tracking="web" type="labels" width="2540" media-col-ready0 bottom="525" left="100" length="2540" name="oe_square-multipurpose-label_1x1in" right="100" source="main-roll" top="525" tracking="web" type="labels" width="2540" orientation-requested-default none print-color-mode-default monochrome print-content-optimize-default auto print-quality-default normal print-scaling-default auto printer-darkness-configured 50 sides-default one-sided printer-resolution-default 300x300dpi

Please let me know if there are other things you would like me to try.

On Mon, Jan 3, 2022 at 11:36 AM Michael R Sweet @.***> wrote:

@jrperk https://github.com/jrperk What do you have the loaded media set to? The default media is the 3.5x1.25" address label, but since the DYMO printers lack any sort of media sensing capability you need to make sure to manually configure what you have loaded in the printer.

You can configure the loaded media to the 1x1 square labels at the command-line with:

lprint modify -d PRINTER-NAME -o media-ready=oe_square-multipurpose-label_1x1in -o media=oe_square-multipurpose-label_1x1in

Similarly, if you go to the web interface (typically on port 8000 for a Pi) then you can click on the "Media" button and choose the loaded media.

— Reply to this email directly, view it on GitHub https://github.com/michaelrsweet/lprint/issues/49#issuecomment-1004247336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYJTJ2XG5SXOGEQ2BKBR4DUUHNBJANCNFSM5LENE4ZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- James Randall (Randy) Perkins

michaelrsweet commented 1 year ago

Please re-test with the latest lprint/PAPPL code.