danp Posted May 31, 2013 Share Posted May 31, 2013 Hi,I'd like some help if possible with rendering a barcode to an image. I want to align a barcode and have found that its not possible using the barcode element however you can do this by rendering it to an image.I'm currently usingnew net.sf.jasperreports.components.barbecue.BarbecueRenderer(net.sourceforge.barbecue.BarcodeFactory.createCode128($F{X}))where $F{X} = '123456789'SQL Used:select'123456789' xfrom dual Which produces: However I'd like to know how its possible to do the same using barcode4j rather than barbecue, and also how to actually remove the text below the barcode.Any help would be appreciated. Dan Link to comment Share on other sites More sharing options...
Thomas Zimmer Posted May 31, 2013 Share Posted May 31, 2013 yes, barcode4j supports code128, too.the barcode4j must have an option like "textPosition", set it to "none".unfortunately no property to align the bar code. either set a constant width (if possible) or use a minimum width and let the barcode shrink, if the code expression gets longerCheers, Thomashttp://www.thomaszimmer.net Link to comment Share on other sites More sharing options...
danp Posted May 31, 2013 Author Share Posted May 31, 2013 Hi Thomas, I'm trying to render the barcode as an image, in the image expression rather than using an actual barcode element from the palette. I'm having trouble with what I actually use for the image expression. I assume it will be something along the lines of: new net.sf.jasperreports.components.barcode4j......... However I'm just not sure what the full expression should be. Link to comment Share on other sites More sharing options...
mariahsharp468 Posted November 26, 2013 Share Posted November 26, 2013 er. the barcode image can be set for no text, just choose "hide".you may check this http://www.keepautomation.com/online_barcode_generator/code_128/ and as for java, check this http://www.keepautomation.com/guide/java_barcode_generator.html Link to comment Share on other sites More sharing options...
nanaklinton Posted November 28, 2013 Share Posted November 28, 2013 HI thereThat exactly what i want to do.I also want to rendering a barcode to an image.I have installed an barcode program.But it seems impossible to do that.So i just want to know that if there is any powerful barcode generator which supports to do that.Thanks for any suggestion. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now