-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update label printer drivers to use threshold dithering #5092
Comments
Hi. Attached are files showing the issue
pdftoraster and gstoraster were used on a Ubuntu 14.04, package info: *.ras files can be viewed with Rasterview (http://michaelrsweet.github.io/rasterview/) If this is a cups-filters, CUPS, or Apple macOS issue I am not sure. If anyone could figure out a workaround on macOS, that would be great.. Regards, |
OK, so there are two issues:
So the fix here is to fix the PDF file and/or the driver. |
I am also having this issue with a thermal printer on OS X High Sierra 10.13.4. Its great that you guys have identified the issue but what fix can we all implement to fix this problem? |
@Donileo If the source barcode is embedded as a bitmap or uses a font, the fuzziness issues will not be present. |
@michaelrsweet Unfortunately I am not controlling the original output of the pdf's that I am trying to print. They are being generated in this example from a shipping courier service called Shippingeasy.com. But this same problem exists for shipping label pdfs generated by ebay, amazon essentially all the major selling platforms. They definitely are not using a font for the pdf and look to be images (though I can't tell if bitmap or JPEG or what format). When I open my pdfs and zoom to around 800-1000x the text definitely looks blurry so the entire pdf is an image not just the bar code section. |
@Donileo Interpolation is turned off on macOS when ripping PDFs; if you can file a new issue and attach a sample PDF perhaps we can better determine a cross-platform fix for you... |
Hmm since I am unsure whether the issue is the interpolation here is my sample pdf that I send to print. I think my issue still applies to this topic, if not I'll move it to another issue. The output I get is essentially the same as in this issue except it applies to the entire print. |
I think this issue is also very pertinent: #4820 |
Ghostscript is the producer of this PDF, and they didn't set the proper rendering options so the barcode images are both interpolated and JPEG'd. Garbage-in, garbage-out... :/ Not sure what we can possibly do to improve things here... |
@michaelrsweet Can you explain how I can view the rendering options and the interpolation flag myself for future pdfs? In regards to the pdf file being bad, on Windows with these drivers. Here are sample images of the printout on mac vs windows: Mac on the left, Windows on the right (using seagull drivers and no dithering). Particularly pay attention to how bad the barcode is on the mac side. Though I agree the pdf file can be better. Why is Windows simply printing this same file better? I don't think the issue simply comes down to just the file not being the greatest output. |
What we ended up doing at SATO, since we cannot control user input, is that we added an 8-bit option to our drivers and let the filter have a threshold option, so that the image ends up 1-bit, but without dithering, just a simple threshold cutoff. |
@mwibeck Can you post how this would be done exactly? Not sure exactly how to do what you are saying. |
Unless you can rewrite the filter it is not possible afaik. You're most welcome buying SATO printers instead... :-) |
We could certainly update the rastertolabel driver to ask for 8-bit grayscale and then threshold dither the output; I'll see if I can prototype something with my Zebra printer... |
@michaelrsweet Sounds great! Considering I can't just upgrade CUPS on OS X due to SIP I'm assuming I can just replace the rastertolabel filter and my Zebra ppd file and hopefully implement your changes? Will these changes someday make it to OS X when Apple upgrades to the 2.3.x release? |
@Donileo Filters and backends in /usr/libexec/cups aren't covered by SIP and can be updated. As for what goes into future macOS releases, that's not something I can talk about or predict... :) |
@mwibeck Is there a way to communicate with you outside the scope of this issue? I acquired a SATO WS408DT printer but its just refusing to print anything but its own self calibrated output. |
I m not trying to piggyback on existing thread ,but also want to determine if this issue is related to what we are facing. Attached PDF printed from old cups and new cups, notice the decimal point, its almost invisible. I went through individual printers and when it goes through gstoraster is where things become so light and dithering comes in. Scan_Doc0013.pdf Unfortunately for end users the visibility of the quantity without decimal can be chaotic I have also attached rasterized file it was done using the command below /usr/sbin/cupsfilter -p /etc/cups/ppd/NICK-T420-TEST-ZPL.ppd -m application/vnd.cups-raster /dbstage/dba/tmp2/799649710.pdf > irf.ras 2>log |
Notable part is quantity , there is a decimal in one scan and not in other its definitely after raster filter |
OK, after much deliberation we have decided not to address this in CUPS. A subsequent revision of the ippserver sample code will include compatible "drivers" that offer this functionality to demonstrate the whole "printer application" approach. |
I have this same issue with the barcode clarity as mentioned in this thread. I'm using a Zebra printer and the Zebra ZPL driver on macOS 10.14.6, CUPS 2.2.9. Since a fix was not included in 2.3 CUPS is there a further explanation on how I can resolve? |
[edited] The cups driver name is called Sorry I don't fully understand the path to fixing this here so maybe some of you people can elaborate about the filter. And why this cannot be fixed in a single central place for all of the printers. Does this mean that I need to contact TCL company and inform them there is an error in their driver? Because I definitely didn't buy my printer from those guys. Despite it being the same OEM device underneath. These guys were the other rebrand / reseller the company known as xprinter, only offers a windows driver package and nothing for the linux support. Perhaps... can I work on adding this myself ? Well here is the TSC linux drivers package downloads page https://www.tscprinters.com/EN/support/Support_Download/TDP-244# And here is the PPD file https://gist.github.com/dreamcat4/8a74f6b5151a321fcac076c68dd6aed7 It seems that the driver package installs an executable file named The most interesting thing happens when I run that program. Because it says: $ ./rastertobarcodetspl
DEBUG: ### Start rastertobarcodetspl ###
ERROR: rastertoepson job-id user title copies options [file] So why does this raster program output debugging lines claiming that it's name is actually Is there actually any change that we can modify it in order to fix this dithering problem? Or alternatively would it be worth asking the EFF to look into this matter further as to determine the open or closed source nature of this specific driver by examining the binary? The other thing I found in this archive was a GUI program called There is also this other tab which allows the insertion of "Control characters" so can that be another different way to set the dithering mode? Perhaps not? These all seem to be precompiled binary executables. There is no accompanying source code. Therefore I cannot modify them. [edited] Ah i see now you have made an entirely new seperate project for these types of label printers called |
Hello Everyone, |
We currently have an issue printing PDF (with or without scaling) where the output is fuzzy/not good of quality (refer to attached files). We don't have this issue in Ubuntu (CUPS 1.7.2/ver 14.04/64-bit and CUPS 2.2.2/ver 17.04/32-bit) using the same PDF, printer and drivers.
I also couldn't find anything in the logs which might relate to this. I hope someone could advice me where to look. I can't figure if its Apple or CUPS issue.
Environment/Setup: Mac OS X Sierra/CUPS 2.2.1/SATO CUPS driver/SATO WS408 printer
Thanks in advance.
The text was updated successfully, but these errors were encountered: