michaelrsweet / lprint

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

Print Test Page prints test label followed by blank pages and media becomes misaligned #95

Open tarikjn opened 1 year ago

tarikjn commented 1 year ago

Printer: Zebra ZD420 203dpi DT Driver: zpl_4inch-203dpi-dt Paper: 4 x 6

Print Test Page feature from the web server prints a test label followed by 4 blank pages at normal speed and ~2.25 blank pages at slow speed. After this, the media alignment must be reset.

This also happens intermittently with other documents but seems to be consistently reproducible using Print Test Page.

This issue is not present using macOS 13.1 built-in CUPS driver.

michaelrsweet commented 11 months ago

What version of LPrint are you using?

michaelrsweet commented 10 months ago

Closing for lack of response; will re-open as needed.

tarikjn commented 4 months ago

Apologies for the delay -- I recommend this issue be re-opened as it is reproducing consistently, even after having upgraded to 1.3.1 stable (previous version was 1.2).

Here is what I have so far:

  1. printing first time with the lprint driver will spit out the print followed by ~6.1 empty labels. 3 will feed fast, 3 feed slower
  2. printer then seems to then be in "error" state, gets out of it by opening and closing or restarting it
  3. the feed is subsequently misaligned by a few millimeters, enough to mis-tear labels
  4. the following actions will send you back to 1.:
    • restarting the printer
    • going through the printer realignment process

IMG_8196

Some notes:

I'll keep an eye on this thread to try respond quickly to any further details that may be needed.

michaelrsweet commented 4 months ago

Can you attach your config file (~/.config/lprint.conf, ~/Library/Application Support/lprint.conf, /Library/Application Support/lprint.conf)?

Also, have you done any label configuration/calibration on the printer itself?

tarikjn commented 4 months ago

Can you attach your config file (~/.config/lprint.conf, ~/Library/Application Support/lprint.conf, /Library/Application Support/lprint.conf)?

I cannot find lprint.conf in any of these 3 path. Only lprint.d/ and lprint.state in ~/Library/Application Support/ ...but I found it in /etc/lprint.conf:

DNSSDName LPrint
Contact
DefaultPrinterID 1
MaxImageSize 1073741824 16384 16384
NextPrinterID 2
UUID urn:uuid:d44ca15d-a97a-3f13-6b23-97221fefab04
<Printer did="MFG:Zebra;MDL:ZPL 4-inch/203dpi/Direct-Thermal;CMD:PWGRaster,URF,ZPL,application/vnd.lprint-test,JPEG,PNG;" driver="zpl_4inch-203dpi-dt" id="1" name="lprint-ZD420" uri="socket://192.168.50.119">
DNSSDName lprint-ZD420
Contact
MaxActiveJobs 0
MaxCompletedJobs 100
NextJobId 6
ImpressionsCompleted 5
label-mode-configured tear-off
media-col-default bottom="1" left="1" length="15240" name="na_index-4x6_4x6in" right="1" source="main-roll" top="1" tracking="mark" type="labels" width="10160"
media-col-ready0 bottom="1" left="1" length="15240" name="na_index-4x6_4x6in" right="1" source="main-roll" top="1" tracking="mark" type="labels" width="10160"
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 203x203dpi
Job completed="1719086266" created="1719086266" format="image/urf" id="5" imcompleted="1" impressions="1" name="test-label--usps-4_x_6-7ec2736fc2f22179...623f0f0a7d4485eed298c30ade84db013a.pdf" processing="1719086266" state="9" username="tarik"
Job completed="1674430543" created="1674430543" format="application/vnd.lprint-test" id="4" imcompleted="1" impressions="1" name="Test Page" processing="1674430543" state="9" username="guest"
Job completed="1674429015" created="1674429015" format="image/urf" id="3" imcompleted="1" impressions="1" name="test-label--usps-4_x_6-7ec2736fc2f22179...623f0f0a7d4485eed298c30ade84db013a.pdf" processing="1674429015" state="9" username="tarik"
Job completed="1674428189" created="1674428189" format="image/urf" id="2" imcompleted="1" impressions="1" name="shipping_label_thermal_1952_20230122T203548Z.pdf" processing="1674428189" state="9" username="tarik"
Job completed="1674427980" created="1674427980" format="image/urf" id="1" imcompleted="1" impressions="1" name="shipping_label_thermal_1952_20230122T203548Z.pdf" processing="1674427980" state="9" username="tarik"
</Printer>

Also, have you done any label configuration/calibration on the printer itself?

None other than the auto calibration following these instructions: https://www.youtube.com/watch?v=3cMPWRCqQJE

michaelrsweet commented 4 days ago

Quick question - are you using labels with a black mark between labels on the carrier tape? The picture looks like they are just separated by a gap, but the configuration is for a mark. Since LPrint is telling the printer to look for a mark, that is probably why it is feeding extra labels.

prohtex commented 2 days ago

Hi @michaelrsweet, I'm very excited to learn about LPrint and have begun using it for our many GK420d printers. First, please let me say "thank you!" for all your hard work on this project.

I am having the issue @tarikjn mentions here. It is worth noting that we're moving from the Allensby/Peninsula drivers. These drivers have a software "calibrate paper size" feature that seems to be independent from the printer's own paper calibration. The labels we're using look identical to the photo above, but our printer is GK420d.

Here's what happens:

  1. Install 1.3.1 on macOS Sequoia 15.1
  2. Visit localhost:8000 and install the printer
  3. Media is set to 4x6 label, Gap, Labels
  4. Print test page-behavior is as described above; text page prints fine, after which 2-3 labels advance, and the printer fails to sense gap. Eventually stops in the middle of a label with the red light on
  5. Reset the printer label sensing (hold down the advance button until two flashes, release, and printer recalibrates the label size)

I seem to be less lucky than @tarikjn, as the behavior occurs with the test labels and anything else we send to the printer. The label always prints fine, followed by a mess of additional labels and a printer stuck with red light, needing re-calibration and power cycle to use again.

From what I understand, the printer label size calibration is not enough. There must be some software calibration as well for label size. We've reproduced this on multiple computers and printers, and I've tried all the settings I can think of in terms of Printing Defaults, etc. I thought at first that the page size might be the culprit (ie, printer was being sent something slightly larger than 4x6) but I'm really stumped.

Happy to include any configuration files as needed. I should mention that I do not see any of these files on the system: ~/.config/lprint.conf ~/Library/Application Support/lprint.conf /Library/Application Support/lprint.conf