corgano Posted May 26, 2015 Posted May 26, 2015 (edited) I have seen many different threads about generating barcodes, displaying them, and printing them. However at this point I am completely torn with which method to use. I am making a software that lets the user scan items, enter in information and save it in a SQLite database. For my purposes, I want to be able to display the barcode with number underneath in a similar way to most other controls eg GuiCtrlCreateBarcode( barcodenumber, x, y, width, height ). I also want to be able to print the barcode and have it be readable by the same scanner - The most successful encoding I've found is code128. Here is what I have found so far:This thread has nice code that saves the output as imagesPrinting is easy and scans properlyDisplaying the image on a pic control makes it easy to set it's x/y/width/heightBut..The code does not let you directly specify the width / height, so displayed image on GUI is ALWAYS skewed.Getting output images the right size with that code is very difficultI cannot find any examples of drawing barcodes to an image that let you specify width / heightThis example Several threads use Static controlsLook very nice on GUI, easy to get explicit position and sizeBut...I know of no way to turn a bunch of static controls into something printableI didn't find any examples that had numbers at the bottom of the barcodeThe third solution I found was using a barcode fontCan look nice, depending on fontShouldn't be hard to printBut..Depends on additional font being installedSome fonts don't scan correctlyHow do you specify a width / height of an area you want the barcode to fill when using a font?I'm really at a loss as to how to move forward. Maybe there's an example I missed that is better suited to what I could find? PErhaps someone has experience writing barcode scanning / generating / printing software and can share the experiences. Can someone bounce a few ideas back and forth with me on the best way to proceed? Edited May 26, 2015 by corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
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