Jump to content

Brainstorming: Displaying and printing barcodes - what is the best way?


Recommended Posts

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 images
    • Printing is easy and scans properly
    • Displaying the image on a pic control makes it easy to set it's x/y/width/height
      But..
    • 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 difficult
    • I cannot find any examples of drawing barcodes to an image that let you specify width / height
    • This example 
  • Several threads use Static controls
    • Look very nice on GUI, easy to get explicit position and size
      But...
    • I know of no way to turn a bunch of static controls into something printable
    • I didn't find any examples that had numbers at the bottom of the barcode
  • The third solution I found was using a barcode font
    • Can look nice, depending on font
    • Shouldn't be hard to print
      But..
    • Depends on additional font being installed
    • Some fonts don't scan correctly
    • How 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 by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...