Using a font to create a barcode - is this correct? Am I missing something?

I saw a lot of threads and posts about .NET and creating barcodes. Many people talk about libraries, dlls and some out of the box applications. I just ask myself: do I really need all this stuff? Im (at this time) is able to create a barcode without any additional library or anything else. Thats works great with Font . I just need a barcodefont, let's take one free, like 3 out of 9 , I can install it (in fact, I don’t even need to install it, it’s enough to have a file path), and then Ill do something like this:

Font f = new Font("Free 3 of 9", 80); this.Font = f; Label l = new Label(); l.Text = "*STACKOVERFLOW*"; l.Size = new System.Drawing.Size(800, 600); this.Controls.Add(l); this.Size = new Size(800, 600); 

And I can display the barcode. And you know what? My phone can read it. So that's how easy it is. I could save it as jpg, I could skip it in an xml file and so on. If I want a different barcode, I need a new font, replace 3 of 9 with something else, and here it is.

So here is my question: what have I lost? Everyone is talking about “something that has already been done,” “use libraries,” etc. So, what problems can I get if I continue this without additional libs and other things? Any suggestions? Thanks you

+6
source share
1 answer

3 out of 9 is just one way to encode barcodes. Usually, when we think about barcodes, we think about UPC standards, but for most barcode readers, 3 out of 9 work great. If it works for your application, do not waste your time on a third-party library and just use a 3 of 9 font.

Please note that standard 3 of 9 does not contain a check digit. This helps to detect read errors in some standards. The encoding wikipedia page has some details about this, but it doesn't seem like it is very important because of how the characters are encoded.

+5
source

Source: https://habr.com/ru/post/917013/


All Articles