Hi,
I am saving Barcode in either PNG or JPEG format but the label of the barcode is having underline. I am rendering those barcode into a table for preview, no underline appears but inside the image file it does.
Does anybody know how disable the label's underline in the output file. I have already tried setup Font into the Barcode.
FYI: And for some reason the GIF format doesn't work (this is not important).
The following is code snippet which is part of my codebase:
[code]
.....
// The BarcodeBean is my bean that encapsulate all the
// barcode related parameters
BarcodeBean barcodeBean= <get instanceof the bean>
// Create the barcode with the text
Barcode barcode = BarcodeFactory.createCode128(barcodeBean.getBarcodeText());
// This doesn't make much difference
barcode.setDrawingQuietSection(false);
// Setup the barcode width (defaulted to 1 pix)
barcode.setBarWidth(barcodeBean.getBarcodeWidth());
// Setup the barcode height (defaulted to 25 pix)
barcode.setBarHeight(barcodeBean.getBarcodeHeight());
// Set the title which not same as the barcode text
barcode.setLabel(barcodeBean.getTitle());
// Save as JPEG
BarcodeImageHandler.saveJPEG(barcode, new File(barcodeBean.getBarcodeImageFile());
.....
[/code]
Thanks
Digerati.
JPEG FILe
Logged In: YES
user_id=156581
Originator: NO
Did you find this bug in Barbecue 1.1? Can you reproduce the bug in Barbecue 1.5 alpha 3?
Logged In: YES
user_id=990421
Originator: NO
I found this issue in 1.5 alpha 3 and believe it can be fixed by editing the constructor in CenteredLabelLayout.java and changing the line:
super(x, y, width, NOT_SET);
To
super(x, y, width, BARS_TEXT_VGAP);
I have not done a full impact analysis of this change, I just know that it fixes the problem for my particular needs.
HTH.
Logged In: YES
user_id=2162297
Originator: NO
yes, i am using Barbecue 1.5 alpha 3 in jsp page.
Is there any ETA on this fix, as it's blocking us to use this software?
I use Barbecue 1.5 Beta 1. The problem still exist.
The constructor in file CenteredLabelLayout.java is already updated with super(x, y, width, BARS_TEXT_VGAP);
Any solution?
One solution: Change SizingOutput.java drawText() to: