Page 1 of 1
Simple address barcode, create and read?
Posted: Sun Jul 05, 2015 1:40 pm
by Fangbeast
I'd like to be able to create a standard barcode (not qrcode, cannot guarantee that the physical size remains the same based on the amount of data, it grows) for a simple address which I can then read back with a barcode reader. It's just for my own use.
The format would be: Title|Firstname,Middlename,Lastname|P.O Box,Street,Suburb,City,State,Postcode,Country
Using a standard linear barcode would enable me to only have to worry about the length of the barcode and not the height so much.
is this possible?
I have a barcode scanner that I can test with for reading.
Re: Simple address barcode, create and read?
Posted: Sun Jul 05, 2015 3:18 pm
by infratec
Hi Fangbeast,
I did this with (not only) PB.
But I think it's not possible with something other than a 2D code
Because of the length of your data.
Normmal usable barcode for this is Code128, but the length...
So you will end in DataMatrix or QR, trust me.
I used ZBar for decoding and qrcodelib for encoding.
Works fine.
Bernd
Re: Simple address barcode, create and read?
Posted: Sun Jul 05, 2015 8:52 pm
by Fangbeast
Hi Fangbeast,
Good morning Bernd! Darek and very cold here.
I did this with (not only) PB.
Been playing with some qrcode here to generate but the size restraints on my form means that it won't fit when addresses over a certain size (Characters) are used as it grows in size.
But I think it's not possible with something other than a 2D code Because of the length of your data.
I was afraid of this. Don't want to redesign the entire form just for that one idea. Oh well, it was a good idea:):)
Normmal usable barcode for this is Code128, but the length...
So you will end in DataMatrix or QR, trust me.
Have you been talking to my wife??? She always says "Trust me!!"
I used ZBar for decoding and qrcodelib for encoding.
I've been using QRCodeGen from the forum but haven't heard of zbar.
Re: Simple address barcode, create and read?
Posted: Sun Jul 05, 2015 11:25 pm
by bbanelli
Fangbeast wrote:I'd like to be able to create a standard barcode (not qrcode, cannot guarantee that the physical size remains the same based on the amount of data, it grows) for a simple address which I can then read back with a barcode reader. It's just for my own use.
Why don't you try
PDF417? It's not 1D, but it should be far more standardized and professional than QR, for example.
Re: Simple address barcode, create and read?
Posted: Sun Jul 05, 2015 11:45 pm
by jwrjrjwrjr
Could you compress/compact the data before saving to the barcode? Un-compact when you scan the barcode. I know, probably a bad idea, but that's the kind I have the most of.
John
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 3:46 am
by Fangbeast
jwrjrjwrjr wrote:Could you compress/compact the data before saving to the barcode? Un-compact when you scan the barcode. I know, probably a bad idea, but that's the kind I have the most of.
John
D'oh!! I didn't think of that did I John?? Can I blame the freezing weather for the lack of synaptic ability? Great idea, now I'll hunt up some code in the forum because I seem to remember some simple examples for string compression.
Thanks John!
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 3:52 am
by Fangbeast
Why don't you try
PDF417? It's not 1D, but it should be far more standardized and professional than QR, for example.
Professional??? Sites all over the world use QRCode, I doubt it gets more 'professional' than that:):)
I've run up your code and lacking any experience, it don't look like any barcode i've ever seen. And it looks far to complicated for my limited experience to follow. I'll just drop that idea and finish some simpler things that I can follow.
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 9:49 am
by bbanelli
Fangbeast wrote:Professional??? Sites all over the world use QRCode, I doubt it gets more 'professional' than that:):)
I don't know what "sites all over the world" have to do with bar code being professional.
I've run up your code and lacking any experience, it don't look like any barcode i've ever seen.
Then you didn't fly much or seen many UPS/DHL/Fedex postal parcels.
Point being, if you need something secure and flexible, I don't think QR is way to go. Datamatrix, as mentioned, or PDF417, depending on you specific requirements, might be solutions you seek for.
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 12:55 pm
by Fangbeast
I don't know what "sites all over the world" have to do with bar code being professional.
Your comment about 'professional' made no sense to me either.
Then you didn't fly much or seen many UPS/DHL/Fedex postal parcels.

Correct. I tried flying once but my arms got so tired.
Point being, if you need something secure and flexible, I don't think QR is way to go. Datamatrix, as mentioned, or PDF417, depending on you specific requirements, might be solutions you seek for.
Maybe, maybe not. I wonder if jwrjrjwrjr's idea about string compression would work or make the compressed string too long??? Don't know.
At the end of the day, I decided that putting the QRCODE into my form, necessitating a complete redesign; was an idiotic idea. The following string:
"Title|Firstname,Middlename,Lastname|P.O. Box,Street,Suburb,City,State,Postcode,Country" will be packed into some sort of barcode/qrcode and sent directly off to my Dymo label printing routine from my AddressBook program.
Since my program doesn't know how to get the size of the current label being used, I am assuming the standard label size and that only leaves room for a small qrcode so that idea was a bad one.
Your barcode idea is good, it will fit. But it's currently beyond my abilities to utilise (Read: I'm dumber that fried pork)
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 1:35 pm
by infratec
Hi Fangbeast,
one good reason for QRcode is:
Each smartphone with camera can decode it and if you store the information in VCS format,
than you can simply add the address to the phonebook of the smartphone.
Bernd
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 2:25 pm
by captain_skank
Just too chip in my two pennies worth.
Seeing as it's your own app for your own use, why not just barcode an ID number rather than all the address info ??
Then when you scan the id you match it to the relevant record in your database / record storage.
Cheers
</gets coat> </exits stage left>
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 3:50 pm
by Marc56us
1D barcode (generic name aka 'barcode')
Main code usages:
- Code 128
- Code 39
Pro:
- Fast reading
- Cheap scanner (usb with led ~ $30)
- No driver need for scanner (work as keyboard) (don't forgot to put keyboard in UPPERCASE when reading)
- Easy to generate code in pb (see excellent PureBarcode
http://www.purebasicpower.de/?PrintBarcode)
- Useful to manage book, CD, DVD collections (scan ISBN, ISSN)
Cons:
- max about 30 characteres (due to the size of the reader)
2D barcode (generic name aka 'qrcode' but other exist)
Main code usage:
- QRCode
- Datamatrix
Pro:
- many chars (~ 3000 to 7000)
- Can be read with smartphone
Cons:
- Read with smartphone is slow and not confortable for many scans
- Scanner exist, but is expensive (~ $200)
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 6:45 pm
by Julian
I used Code128 when I made a barcode system for a shop. As it can support ascii I could design some labels to perform certain functions followed by a record ID integer ie.
S-12345 (service for customer ID 12345), each of the items brought in were labelled up so nothing went missing
I then fired the label data to a zebra GK420t to generate a custom label.
I made an EPOS and activex edition so labels could be printed out either at the till or via a web portal.
I used the same system to label up the shops shelving:
SH-AB1 (row A, rack set B, shelf 1) so stock could be placed onto a shelf and its location stored using a Datalogic Powerscan PM8300 which I also wrote the interface for.
Ahh those were the days
All of this was done in VB, I should convert some of those libraries across to PB at some point.
Re: Simple address barcode, create and read?
Posted: Mon Jul 06, 2015 10:49 pm
by bbanelli
Fangbeast wrote:Your comment about 'professional' made no sense to me either.
Check the specification and it'll be much clearer what I meant, opposed to QR which is sort of a child's play.
Since my program doesn't know how to get the size of the current label being used, I am assuming the standard label size and that only leaves room for a small qrcode so that idea was a bad one.
You can make PDF417 retaining maximum size to your convenience, and if you have fewer data, it will pad rest of the bar code, so that should remedy your problem, right?