Previous Thread
Next Thread
Print Thread
Advanced Barcode Printing #854 27 Oct 11 01:27 PM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,650
We've had some recent inquiries about integrating more advanced bar code capabilities into A-Shell. For simpler bar codes, like 3 of 9 (see Printing Bar Codes for a discussion of that one), you can just obtain the font and output with it nearly as you would for any other font.

But for some of the more advanced bar codes, like UPC and EAN which include graphics and text in such a way that is incompatible with the one-to-one relationship required for normal font translations, some kind of "encoding" operation is required. Here's an example of EAN13:

[Linked Image]

And here's a 2D code (PDF417):
[Linked Image]

It is possible to study the specs for these bar codes and then just generate them with raw Basic code using the //GDI primitive drawing functions, but that's probably more work than anyone really wants to do. The best alternative that we've been able to find online is a set of libraries and fonts that can be licensed from a company called ID Automation (here's their product matrix: http://www.idautomation.com/sitemap/ )

So the question is whether it would be worthwhile for us to license one or more of their bar codes and integrate it into the A-Shell/Windows GDI printing subsystems, probably via a new //BARCODE command, so that you could include them in your applications. Obviously there would be costs involved, and decisions to make about which fonts to implement.

I know that many of you have already gone through this process and have come up with other solutions. What I don't know is whether there is a present or future need to implement newer/more-complicated bar codes for which a centralized/integrated solution would be more advantageous than everybody finding independent solutions.

Last edited by Ty Griffin; 15 Aug 19 11:53 PM.
Re: Advanced Barcode Printing #855 27 Oct 11 02:11 PM
Joined: Aug 2001
Posts: 2,645
H
Herman Roehm Offline
Member
Offline
Member
H
Joined: Aug 2001
Posts: 2,645
I don't know of a current need for this, but certainly could see it in the future.

Re: Advanced Barcode Printing #856 28 Oct 11 03:51 AM
Joined: Sep 2003
Posts: 4,135
Steve - Caliq Offline
Member
Offline
Member
Joined: Sep 2003
Posts: 4,135
We do use bar codes of different flavors, many we let the 'barcode printers' do all the work, others we have used something like Print Wizard that sits between Ashell and the printer and turns simple commands into barcodes. Most of our reports and printouts are using PCL etc, so has always been an issue using or moving towards the GDI.

Anyway, still sounds useful, but dont know when, it could be tomorrow a customer phones up regarding barcoding, or could be in a year or so time.

Re: Advanced Barcode Printing #857 02 Nov 11 08:20 AM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
It would be a good "add-on". And i dont think it would be a problem passing the cost of this to the customers who need this capability down the road. (if it were to be a license/add on package)

Re: Advanced Barcode Printing #858 10 Nov 11 07:08 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
Note that the post office DPBC Delivery Point bar code is already done using GDI commands. The routine is in the shared source.

There are also routines to implement the new IMBC Intelligent Mail Bar Code which was to become the new post office standard.

Most of the other bar codes like 3 of 9 and OCR are available for free. I have copies of these.

Just sayin.

Re: Advanced Barcode Printing #859 10 Nov 11 01:45 PM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,650
Good point. Joe and I put fair amount of work into implementing the new US Post Office bar code earlier this year. Similarly to the other fancy ones (like EAN13), it requires converting the original source text into a special coded string which can then be output as a bar code. (The Post Office supplied the conversion routine code, and I integrated it into A-Shell as USPSBS.SBR.)

But in this case, rather than using a special font, Joe wrote a routine in Basic to render the coded string as a bar code using GDI commands.

The sample program is in the SOSLIB in the [908,52] directory and can be downloaded here:
USPSGDI.BP

And here's a sample of the what the bar code looks like:

[Linked Image]

Theoretically, a similar approach could be taken for EAN13 and even the 2D codes, but the task would be complicated by the relative lack of public resources (specifications, code, etc.) compared to what the Post Office made available. But, if you're looking for a challenge, I have it on good authority that Jorge would be willing to pay a few hundred dollars for an implementation of EAN13. (Let one of us know if you're interested, before we go head and purchase/implement a commercial version.)

Re: Advanced Barcode Printing #860 12 Nov 11 11:15 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
I looked at the EAN13 specification and it looks very much like what I did for the postal bar-code. It shouldn't be too hard to convert that routine to do what you want Jorge. Send me an email with some details on what you are doing and I will see what I can do. I can probably do it next week.

A link to what I found is.......

http://barcode-coder.com/en/ean-13-specification-102.html

Re: Advanced Barcode Printing #861 12 Nov 11 03:15 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Thank you Joe, e-mail sent already...


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #862 12 Nov 11 08:40 PM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
It really wasn't that difficult. Most of the work was already done in the DPBC barcode routine I had written. I just printed a bar code that looks good. I will clean up the program and document it and send it to you Monday sometime. Then we can talk about customizing it for what you need to do.

Re: Advanced Barcode Printing #863 13 Nov 11 10:38 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
Jack will post an EAN13 in the shared source if anyone wants it. It will take the source UPC code and output the EAN 13 bar code using GDI commands. It can probably be easily converted to do other UPC bar codes as well.

Re: Advanced Barcode Printing #864 13 Nov 11 10:46 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
A quick look at the 2d PDF417 bar code tells me that could be programmed using GDI as well. It thinks in clusters instead of bars and handles all of the ascii characters but its the same concept. If anyone has an immediate need for this let me know. We would need to find a detailed spec on it but it must be out there somewhere.

Re: Advanced Barcode Printing #865 21 Nov 11 03:52 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Here is a perfect EAN13 sample, 100% produced by the program that Joe wrote, excellent work.

[Linked Image]

I'm going to convert the program into an SBX and Function, afterwhat, I believe will become public with Joe's agreement.

Many thanks Joe.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #866 21 Nov 11 10:18 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
Please add the program to the shared source for ashell users.

Re: Advanced Barcode Printing #867 21 Nov 11 11:02 AM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,650
That's exactly what I'm going to do after Jorge sends me his function and I give it an editorial once-over.

Re: Advanced Barcode Printing #868 28 Nov 11 01:02 PM
Joined: Nov 2001
Posts: 154
G
Gary Guilbert Offline
Member
Offline
Member
G
Joined: Nov 2001
Posts: 154
Question(s) from the newbie.
I am coming from not even able to spell "BAR CODE",
I cut and pasted from above to get the spelling correct.

I want to print my inventory stock number tags with bar codes. They are a simple 6 digit number, but I am thinking that I should keep the option open
to read the UPC code from the item as well. Then have a double key index to the data file, for "my stock numbers" as well as the UPC.

How do I decide what bar code to use?
How do I know what scanners will read the code?
Does "any/all" scanners read any barcode?


Thanks, Gary

Re: Advanced Barcode Printing #869 28 Nov 11 02:04 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Hi Gary,
For internal use, my suggestion goes for Code39 barcodes because you can use it as a normal text print and just setting the font to any of the thousands free Code39 fonts you can find on the web (if not, I can send it to you).
Besides you mentioned that you use just six digits, Code39 allow you to mix letters and numbers; the unique detail you must be aware is to prefix and suffix your code code with "*" (asteriscs), an example for the code "123456" is:
//setfont, 90, 3of9, 0, 0, 400
//textout,100,100,*123456*

Hope this helps


P.S. note that "3of9" is just an example of font name I use


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #870 26 Nov 12 01:19 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Joe, do you have this already adjusted for EAN128 or, would it take too long to do it ?


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #871 27 Nov 12 09:51 AM
Joined: Aug 2001
Posts: 2,645
H
Herman Roehm Offline
Member
Offline
Member
H
Joined: Aug 2001
Posts: 2,645
Jorge, I have a 128a, 128b, and 128c freebie. I'm not sure if this qualifies as EAN128, but you are welcome to it and the code to calculate the check digit, etc. I use 128b because it allows upper and lower case, numeric, and special characters.

Re: Advanced Barcode Printing #872 27 Nov 12 10:09 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Hi Herman, thanks for the offer but, do you build the barcode itself ready to print or just calculate the check-digit? If I remember from a previous post, you mentioned something about you're using the barcode font built in the Lexmark printer, or am I confusing things?
Joe wrote a great routine that handles everything to print a very well formed EAN13 barcode and I would love to have the same adjusted to EAN128.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #873 27 Nov 12 10:16 AM
Joined: Aug 2001
Posts: 2,645
H
Herman Roehm Offline
Member
Offline
Member
H
Joined: Aug 2001
Posts: 2,645
We are getting away from the barcode font loaded in the printer so ehat I am talking about is not that. This is one I use with GDI printing and is simply a Windows font. I just googled EAN128 and what I have probably is not what you need, but you or anyone else is welcome to it. With this font I have to add a start digit, checksum digit, and ending digit and then print it using textrectangle.

Re: Advanced Barcode Printing #874 30 Nov 12 07:56 PM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
EAN128 looks like a version of EAN13. I think the SOSLIB program can be changed for that. Let me take a look at it and get back to you.

Re: Advanced Barcode Printing #875 01 Dec 12 03:57 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Thank you very much Joe, I really appreciate if you do that adjustment because I tried to do it by myself but I just don't know where to start and, worst, didn't trust in what I was doing.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Advanced Barcode Printing #876 01 Dec 12 08:25 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
No problem. The first step is learning the specification. The place we used for EAN13 has the rules for EAN128 also. I think that this is the guideline I will use...

http://www.barcodeisland.com/uccean128.phtml

Re: Advanced Barcode Printing #877 01 Dec 12 11:26 AM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
Check your email for EAN128. You'll need to do some testing but the bar code produced looks like the sample. I don't have a reader to try it.

Re: Advanced Barcode Printing #878 01 Dec 12 01:12 PM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
I found this site which explains the details of many popular bar codes.

http://www.barcodeisland.com/symbolgy.phtml

Re: Advanced Barcode Printing #879 01 Dec 12 02:03 PM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,650
You are the Bar Code Maestro!

Thanks for sharing your expertise. After Jorge gets a chance to verify that it meets the spec, I'll make sure it gets into the updated SOSLIB.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3