[barcode] Postnet suppport

Alessandro Rubini rubini@gnu.org
Fri, 21 Feb 2003 18:28:11 +0100


Hello.

> I thought it was a bug, but it was another mistake in my code, so
> sorry for bothering you

Ok, good to know. I was somewhat concerned about that (although I forgot
about the problem, since I'm in high load).

> The main reason for my mail is that I think the support for US Postal or 
> Postnet barcodes would be a good addition to GNU barcode.

Yes. It is in my plans too.

> If you know Postnet barcodes allready you will know that the code can't work 
> yet. According to my source of information [...]

I also got a manual from the us post service (I've printed it and forgot
where I got it from). Also, I've several sample postnet codes from various
magazines (they all have a pre-stamped card inside for new subscriptions).

And yes, I know it can't fit gnu barcode. There are a lot of encoding
systems that can't fit the current approach for the intermediate
language. Like 2D-codes and other stuff.

So here's my plan for extending the current mechanism:

* each encoding is an object, not an entry in a list but a more complex
data structure, that registers itself in the core registry. 

* the "encoding" object can declare its own symbols for the intermediate
representations and its own implementation for final output. It will also
declare which output engines it supports (as output generation is now
split inside the individual encodings, and not all in ps.c/pcl.c).

* The symbols [1-9+-] are already managed by ps.c/pcl.c, so the current
encodings will not need to have additional code, they just spit the current
intermediate representation.

* Postnet adds the symbols [pP] (short and long bars), and it's
intermediate representation will be made up of such symbols alone (and
no textual representation).  So actual rendering is performed back by
the postnet encoding itself.

Any comment is welcome. Unfortunately I don't know when will I be able
to work on this stuff.

/alessandro
-- 
Alessandro Rubini, free software specialist.
Device drivers, embedded systems, courses.
http://ar.linux.it/