We were generating the barcode, turning it into an image, but then
slightly resizing it before placing it on the page. This resizing
was causing dithering which made the barcode useless.
The solution was to print the barcode images without resizing them.
As I say below, your suggestion to print out diagonal lines is what
led us to the real problem, because they printed perfectly.
I included my answers to your questions below from before we figured
out the problem. This way others can learn from our experience in
the archives.
If anyone is interested, we are using http://
barbecue.sourceforge.net/ to generate the barcodes, and they now
look great.
Thanks for your help Greg,
- Grant Wood
On May 1, 2006, at 4:24 PM, Greg Guerin wrote:
Random idea: maybe the default anti-aliasing hint for the printer's
graphics context is set to enable anti-aliasing. Try setting the
hint to
disable anti-aliasing.
This was a good thought, and we tried this, but it had no noticeable
effect.
If by "fuzzy" you mean jaggy or imprecisely placed, then anti-aliasing
might make it even worse.
My language choice here was poor. Normally, the vertical lines of
the barcode are crisp vertical lines (when printed from Acrobat and
viewed onscreen). When they print from my application they take on
the imprecise appearance of an image that has been poorly resized.
The appearance is better describes as dithering.
There is a certain regularity to the dithering that is occurring on
the edges of the lines, like it is being resized and resampled at a
lesser resolution. Ie: 72dpi. Also, I noticed that in the large
whitespaces between any two whole barcodes, there is a certain fine
mist of toner that has been printed.
What printer model are you printing to?
Several.
HP LaserJet 8150
- using latest HP driver
- prints up to 1200 DPI
Samsung ML-1710 laser printer
- using foomatic GDI driver
- prints up to 600dpi
HP LaserJet 4
- using latest HP driver
- prints up to 300 DPI
What does printing a diagonal line from a Java app look like? Is
it fuzzy,
jaggy, low-res, or something else?
Doing this actually led to us fixing the problem. The lines printed
perfectly, which is how we figured out what the problem was.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden