On barcodes

classic Classic list List threaded Threaded
7 messages Options
WLD WLD
Reply | Threaded
Open this post in threaded view
|

On barcodes


Hi folks,

I've spent some time this evening going over the barcodes in pERP, the PEAR Image/Barcode stuff and GD bits.  There are some many hundreds of barcode formats, from the common one-dimensional to the clever two-dimensional to the extreme two-dimensional multi-coloured tag-like.  Obviously pERP should ideally support as many as the underlying image generation system can provide.  However, the primary types used by business are now specified as Global Trade Identification Number (GTIN) types.  These cover all the common types of barcode found in business, primarily the two most common formats: Universal Product Code (UPC) and International Article Number (EAN, formally "European").

I believe pERP should aim to support all GTIN standard barcodes formats where possible, and support them strictly to the standards.  A non-definitive list of commonly used GTIN barcode formats which I believe should be tightly supported are:

EAN-8 (8 digits)
UPC-A (12 digits) *
UPC-E (12 digits)
EAN-13 (13 digits) *
GS1-128 [encoded w/Code-128] (variable length) *
Code-3/9 (variable length) *#

*=currently available to use
#=I have included this even though it doesn't fall under GTIN but because it's used commonly in many ad-hoc business applications


At the moment there's no strict checks to enforce the generation of valid barcodes from valid user data.  For example, all of these are either invalid and work, or valid and don't work:

http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=Code39&code=i+am+invalid  (Code-3/9 doesn't support lower-case)

http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=Code39&code=I+AM+$M+VALID (Code-3/9 allows "$?" control characters which should not be printed)

http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=upca&code=invalidcodes (UPC-A supports 12 ordinals only)

http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=upca&code=0000000000000 (UPC-A with 13 ordinals is valid, we just call it EAN-13 now)

http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=ean13&code=1111111111111 (EAN-13 with valid code, missing > indicator for quiet zone - generated image won't scan)


I'm keen for everybody's thoughts on these issues raised and suggestions on the way forwards.

Kindest regards,
Paul/WLD


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

On Mon, Feb 15, 2010 at 9:48 PM, WLD <[hidden email]> wrote:
>
> Hi folks,
>
> I've spent some time this evening going over the barcodes in pERP, the PEAR Image/Barcode stuff and GD bits.  ...
> I believe pERP should aim to support all GTIN standard barcodes formats where possible, and support them strictly to the standards.

I agree.  An additional consideration might be for assemblies, if the
company's GTIN prefix is known, barcodes could be automatically
generated or verified.

I spent a while trying to find a barcode generation library that would
support what was needed, and at the time the PEAR library was the only
one that was PHP, and would do EAN-13.  I took a quick look around
this morning and discovered zint (http://www.zint.org.uk) which is a C
program with a CLI that might work.  I'm not sure why I didn't find it
before...
It supports a lot of formats, and I invite comments on replacing the
un-maintained PEAR library with zint.

However, using the online generator they provide, the following will
not generate:

> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=Code39&code=I+AM+$M+VALID (Code-3/9 allows "$?" control characters which should not be printed)
>
> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=upca&code=0000000000000 (UPC-A with 13 ordinals is valid, we just call it EAN-13 now)
>
> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=ean13&code=1111111111111 (EAN-13 with valid code, missing > indicator for quiet zone - generated image won't scan)


I don't have a scanner available any more, so I can't verify the
generated codes.

> I'm keen for everybody's thoughts on these issues raised and suggestions on the way forwards.

I'm happy to have someone around that actually knows something about
this stuff.  The main obstacle to barcodes in pERP is finding a good
OSS library to handle generation.  The last time I swapped out the
barcode generator, I put in a bit of abstraction so changes shouldn't
be too bad, no matter what changes are needed.  I don't have any
preferences other than to prefer PHP, but if PEAR isn't doing it, it
needs to be changed.

Nathan

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Justin F. Hallett Justin F. Hallett
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

I checked to see if there was an official zint debian package to install it for you this morn, but there isn't anything on debian, I'll keep looking, if need be I'll build it, but having a package would be more beneficial I think.
---
Justin F. Hallett
Blue Falls Manufacturing Ltd.
I.T. Manager
http://www.goarctic.com/
Tel: (780) 789-2626 ext.323
Cel: (780) 935-9771
Fax: (780) 789-2624


On 2010-02-16, at 9:25 AM, Nathan Gray wrote:

> On Mon, Feb 15, 2010 at 9:48 PM, WLD <[hidden email]> wrote:
>>
>> Hi folks,
>>
>> I've spent some time this evening going over the barcodes in pERP, the PEAR Image/Barcode stuff and GD bits.  ...
>> I believe pERP should aim to support all GTIN standard barcodes formats where possible, and support them strictly to the standards.
>
> I agree.  An additional consideration might be for assemblies, if the
> company's GTIN prefix is known, barcodes could be automatically
> generated or verified.
>
> I spent a while trying to find a barcode generation library that would
> support what was needed, and at the time the PEAR library was the only
> one that was PHP, and would do EAN-13.  I took a quick look around
> this morning and discovered zint (http://www.zint.org.uk) which is a C
> program with a CLI that might work.  I'm not sure why I didn't find it
> before...
> It supports a lot of formats, and I invite comments on replacing the
> un-maintained PEAR library with zint.
>
> However, using the online generator they provide, the following will
> not generate:
>
>> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=Code39&code=I+AM+$M+VALID (Code-3/9 allows "$?" control characters which should not be printed)
>>
>> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=upca&code=0000000000000 (UPC-A with 13 ordinals is valid, we just call it EAN-13 now)
>>
>> http://demo.projecterp.org/perp_api/inc/barcode/image.php?encoding=ean13&code=1111111111111 (EAN-13 with valid code, missing > indicator for quiet zone - generated image won't scan)
>
>
> I don't have a scanner available any more, so I can't verify the
> generated codes.
>
>> I'm keen for everybody's thoughts on these issues raised and suggestions on the way forwards.
>
> I'm happy to have someone around that actually knows something about
> this stuff.  The main obstacle to barcodes in pERP is finding a good
> OSS library to handle generation.  The last time I swapped out the
> barcode generator, I put in a bit of abstraction so changes shouldn't
> be too bad, no matter what changes are needed.  I don't have any
> preferences other than to prefer PHP, but if PEAR isn't doing it, it
> needs to be changed.
>
> Nathan
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Perp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/perp-developers
>


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
WLD WLD
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

In reply to this post by Nathan Gray

On Tuesday 16 Feb 2010 16:25:23 Nathan Gray wrote:
> I agree.  An additional consideration might be for assemblies, if the
> company's GTIN prefix is known, barcodes could be automatically
> generated or verified.

That's a good idea Nathan.


> one that was PHP, and would do EAN-13.  I took a quick look around
> this morning and discovered zint (http://www.zint.org.uk) which is a C
> program with a CLI that might work.  I'm not sure why I didn't find it
> before...
> It supports a lot of formats, and I invite comments on replacing the
> un-maintained PEAR library with zint.

I think it will have to be replaced if PEAR is no longer being maintained and simply doesn't support industry standard barcodes that will be required to allow pERP to compete with the likes of SAP.  I had a look at Zint earlier and it does seem very fully functional and mature.


> However, using the online generator they provide, the following will
> not generate:

The web interface at http://www.barcode-generator.org/ doesn't produce the barcodes you mentioned, but this seems to be errors on that site rather than the Zint library.  For example, when selecting Code-3/9 it lets me know $ is a valid character but complains when I type it, and a space is a valid character in this format also but it doesn't like that.  I suspect the library itself would get such things right especially if its capability allows the generation of much more complex barcodes.  This is probably the website authors fault.

If you look at the comparison page http://www.zint.org.uk/zintSite/Comparison.aspx you will see at the bottom it supports all the GS-1 code schema's (which includes all the GTIN formats in my original email) so I think this is a good sign that they will get that sort of thing correct in the library itself.


> I don't have a scanner available any more, so I can't verify the
> generated codes.

http://www.onlinebarcodereader.com/ seems to be from the same author as the generator using Zint, see if it works.  Alternatively the GOCR optical character recognition package on Linux can also read some common barcodes.


> I'm happy to have someone around that actually knows something about
> this stuff.  The main obstacle to barcodes in pERP is finding a good
> OSS library to handle generation.  The last time I swapped out the
> barcode generator, I put in a bit of abstraction so changes shouldn't
> be too bad, no matter what changes are needed.  I don't have any
> preferences other than to prefer PHP, but if PEAR isn't doing it, it
> needs to be changed.

Well ideally a PHP library would be easiest, but let us not forget that PHP is just C and most the extensions are also just C libraries with PHP bindings.  I've contributed bits to PHP and know that creating bindings isn't that difficult.  But at the same time let's not forget that pERP uses other binaries directly, like (un)zip.  Additionally, using a binary would probably make it easier for Windows users to also get this functionality working if there isn't yet a click-install easy PEAR extension for their learned little minds.

It may be worth putting it to the authors of Zint that as the PEAR barcode library is unmaintained, they may very well like to create a competing PEAR package.  PHP has no small audience, so I'm sure their work would be well utilised.

Anyway, it seems as though others are working on such a thing judging from these comments on their site:

"Wrappers
Some people have been good enough to provide wrappers to use the Zint library in other languages. I currently have code for C++, Delphi and PHP but haven't yet had the chance to properly look at this code or add it to the project. If you are looking for this functionality then please contact me and I will be happy to forward what I have. I hope to be able to add this code to the project this year."


Zint seems to be a good find and certainly has my thumbs-up.

Paul

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
WLD WLD
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

In reply to this post by Justin F. Hallett

On Tuesday 16 Feb 2010 16:46:59 Justin F. Hallett wrote:
> I checked to see if there was an official zint debian package to install it for you this morn, but there isn't anything on debian, I'll keep looking, if need be I'll build it, but having a package would be more beneficial I think.


Justin, I noticed on their site they have stated this:


Packaging

Zint needs to be packaged better for Linux platforms. Specifically it needs to be split into separate packages. One for the library and CLI and another for the Qt4 interface. These packages then need to be available in both Debian and Red Hat format. As part of this change I plan to remove the makefiles which are currently part of the source code bundle and refine the cmake configuration to allow compiling of either the whole package or the CLI only.

I also intend to spend some time looking at packaging on other platforms. Specifically I would like to improve support for using Zint on Open BSD and/or Free BSD. I hope this will also make life easier for users of Apple OSX which I am unable to get access to.

Windows users have not been forgotten but, thanks to the fantastic work which has been contributed by others, this platform now has a most complete packaging solution and I can't see anything which needs to be changed here in the coming year.


As they've also indicated they have contributions not released on their site yet it might be worth getting in touch with them.  I've never used Debian myself, I have my own distro which is geared towards remote delivery of ERP systems.  I'm quite sure Zint is going to become a standard library on it!  Debian has never struck me as a distro suited towards the enterprise; there seems to be a lot of interest in CentOS for this.  Have you ever tried it?

Kindest regards,
Paul

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Justin F. Hallett Justin F. Hallett
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

I got the source the debian packaging was indeed there though a little out of date, I created the pkgs for Nathan today he has them and was playing with them last I heard.
---
Justin F. Hallett
Blue Falls Manufacturing Ltd.
I.T. Manager
http://www.goarctic.com/
Tel: (780) 789-2626 ext.323
Cel: (780) 935-9771
Fax: (780) 789-2624


On 2010-02-16, at 4:25 PM, WLD wrote:

>
> On Tuesday 16 Feb 2010 16:46:59 Justin F. Hallett wrote:
>> I checked to see if there was an official zint debian package to install it for you this morn, but there isn't anything on debian, I'll keep looking, if need be I'll build it, but having a package would be more beneficial I think.
>
>
> Justin, I noticed on their site they have stated this:
>
>
> Packaging
>
> Zint needs to be packaged better for Linux platforms. Specifically it needs to be split into separate packages. One for the library and CLI and another for the Qt4 interface. These packages then need to be available in both Debian and Red Hat format. As part of this change I plan to remove the makefiles which are currently part of the source code bundle and refine the cmake configuration to allow compiling of either the whole package or the CLI only.
>
> I also intend to spend some time looking at packaging on other platforms. Specifically I would like to improve support for using Zint on Open BSD and/or Free BSD. I hope this will also make life easier for users of Apple OSX which I am unable to get access to.
>
> Windows users have not been forgotten but, thanks to the fantastic work which has been contributed by others, this platform now has a most complete packaging solution and I can't see anything which needs to be changed here in the coming year.
>
>
> As they've also indicated they have contributions not released on their site yet it might be worth getting in touch with them.  I've never used Debian myself, I have my own distro which is geared towards remote delivery of ERP systems.  I'm quite sure Zint is going to become a standard library on it!  Debian has never struck me as a distro suited towards the enterprise; there seems to be a lot of interest in CentOS for this.  Have you ever tried it?
>
> Kindest regards,
> Paul
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Perp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/perp-developers
>


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
iris iris
Reply | Threaded
Open this post in threaded view
|

Re: On barcodes

This post has NOT been accepted by the mailing list yet.
In reply to this post by WLD
Barcodes are widely used in many fields, like commercial tracking, entertainment and transport ticketing, product marketing and product labeling. Here are some efficient barcode generators and readers. http://onbarcode.com/products/iphone_barcode/   
http://onbarcode.com/products/android_barcode/