Post Net Bar Code printing 
Author Message
 Post Net Bar Code printing

Hi,

   I have been looking for a Post Net Bar Code program I can insert in
one of my existing QB programs and print bar codes using an EPSON DM
printer.  I finally found such a program and it works very well with a
five digit zip code.  I tried to print an 11 digit code and it failed.
I made a couple of changes I thought might work but had no luck.  This
effort is not for profit, just a little project of my own.

  Following is the listing of the program.  I used the phrase "REM"
where I changed a statement.

DECLARE SUB PostNet (Zip$)
OPEN "LPT2:" FOR OUTPUT AS #2
REM  PostNet "73159"
PostNet "73159340816"

SUB PostNet (Zip$)
DIM Zip$(9), BarCode$(9)

'   I added the following statement
   Ln = LEN(Zip$)
   IF Zip$ = "(Can)" OR Zip$ = "00000" THEN LPRINT : EXIT SUB
 ' Initialize
   E$ = CHR$(27)
   M$ = CHR$(3)
   O$ = STRING$(5, CHR$(28)) + STRING$(6, CHR$(0))
   I$ = STRING$(5, CHR$(252)) + STRING$(6, CHR$(0))

   Zip$(1) = "00011"
   Zip$(2) = "00101"
   Zip$(3) = "00110"
   Zip$(4) = "01001"
   Zip$(5) = "01010"
   Zip$(6) = "01100"
   Zip$(7) = "10001"
   Zip$(8) = "10010"
   Zip$(9) = "10100"
   Zip$(0) = "11000"

   FOR Z = 0 TO 9
     BarCode$(Z) = E$ + "*" + M$ + CHR$(55) + CHR$(0)
     FOR I = 1 TO 5
        C = VAL(MID$(Zip$(Z), I, 1))
        IF C THEN
           BarCode$(Z) = BarCode$(Z) + I$
        ELSE BarCode$(Z) = BarCode$(Z) + O$
        END IF
     NEXT I
  NEXT Z

  ' Build BarCode
  ' LINE INPUT "ZIP code: "; Zip$
REM   FOR I = 1 TO 5
      FOR I = 1 TO Ln
        Z = VAL(MID$(Zip$, I, 1))
        Sum = Sum + Z
        BarCode$ = BarCode$ + BarCode$(Z)
      NEXT I
      CorrectionDigit$ = BarCode$((100 - Sum) MOD 10)
      EndCode$ = E$ + "*" + M$ + CHR$(11) + CHR$(0) + I$
      BarCode$ = EndCode$ + BarCode$ + CorrectionDigit$ + EndCode$
REM  LPRINT E$; "E"; BarCode$; E$; "F"
      PRINT #2, E$; "E"; BarCode$; E$; "F"
END SUB

   As my EPSON printer is LPT2 I had to change the LPRINT statements
accordingly.

   I would be very appreciative if someone might help me with this
program problem.

Thank you,
Jim Roberts



Tue, 04 Dec 2001 03:00:00 GMT  
 Post Net Bar Code printing
I am not into bar codes myself but I notice that the Epson ESC/P Reference
Manual provides what looks like a complete description of the coding
necessary for printing bar codes on most, if not all, of their printers.
I hope this helps those needing to know.

Regards
Martin

Quote:

>Hi,

>   I have been looking for a Post Net Bar Code program I can insert in
>one of my existing QB programs and print bar codes using an EPSON DM
>printer.  I finally found such a program and it works very well with a
>five digit zip code.  I tried to print an 11 digit code and it failed.
>I made a couple of changes I thought might work but had no luck.  This
>effort is not for profit, just a little project of my own.

>  Following is the listing of the program.  I used the phrase "REM"
>where I changed a statement.

>DECLARE SUB PostNet (Zip$)
>OPEN "LPT2:" FOR OUTPUT AS #2
>REM  PostNet "73159"
>PostNet "73159340816"

>SUB PostNet (Zip$)
>DIM Zip$(9), BarCode$(9)

>'   I added the following statement
>   Ln = LEN(Zip$)
>   IF Zip$ = "(Can)" OR Zip$ = "00000" THEN LPRINT : EXIT SUB
> ' Initialize
>   E$ = CHR$(27)
>   M$ = CHR$(3)
>   O$ = STRING$(5, CHR$(28)) + STRING$(6, CHR$(0))
>   I$ = STRING$(5, CHR$(252)) + STRING$(6, CHR$(0))

>   Zip$(1) = "00011"
>   Zip$(2) = "00101"
>   Zip$(3) = "00110"
>   Zip$(4) = "01001"
>   Zip$(5) = "01010"
>   Zip$(6) = "01100"
>   Zip$(7) = "10001"
>   Zip$(8) = "10010"
>   Zip$(9) = "10100"
>   Zip$(0) = "11000"

>   FOR Z = 0 TO 9
>     BarCode$(Z) = E$ + "*" + M$ + CHR$(55) + CHR$(0)
>     FOR I = 1 TO 5
>        C = VAL(MID$(Zip$(Z), I, 1))
>        IF C THEN
>           BarCode$(Z) = BarCode$(Z) + I$
>        ELSE BarCode$(Z) = BarCode$(Z) + O$
>        END IF
>     NEXT I
>  NEXT Z

>  ' Build BarCode
>  ' LINE INPUT "ZIP code: "; Zip$
>REM   FOR I = 1 TO 5
>      FOR I = 1 TO Ln
>        Z = VAL(MID$(Zip$, I, 1))
>        Sum = Sum + Z
>        BarCode$ = BarCode$ + BarCode$(Z)
>      NEXT I
>      CorrectionDigit$ = BarCode$((100 - Sum) MOD 10)
>      EndCode$ = E$ + "*" + M$ + CHR$(11) + CHR$(0) + I$
>      BarCode$ = EndCode$ + BarCode$ + CorrectionDigit$ + EndCode$
>REM  LPRINT E$; "E"; BarCode$; E$; "F"
>      PRINT #2, E$; "E"; BarCode$; E$; "F"
>END SUB

>   As my EPSON printer is LPT2 I had to change the LPRINT statements
>accordingly.

>   I would be very appreciative if someone might help me with this
>program problem.

>Thank you,
>Jim Roberts




Tue, 04 Dec 2001 03:00:00 GMT  
 Post Net Bar Code printing

Quote:

> Hi,

>    I have been looking for a Post Net Bar Code program I can insert in
> one of my existing QB programs and print bar codes using an EPSON DM
> printer.  I finally found such a program and it works very well with a
> five digit zip code.  I tried to print an 11 digit code and it failed.
> I made a couple of changes I thought might work but had no luck.  This
> effort is not for profit, just a little project of my own.

>   Following is the listing of the program.  I used the phrase "REM"
> where I changed a statement.

> DECLARE SUB PostNet (Zip$)
> OPEN "LPT2:" FOR OUTPUT AS #2
> REM  PostNet "73159"
> PostNet "73159340816"

> SUB PostNet (Zip$)
> DIM Zip$(9), BarCode$(9)

> '   I added the following statement
>    Ln = LEN(Zip$)
>    IF Zip$ = "(Can)" OR Zip$ = "00000" THEN LPRINT : EXIT SUB
>  ' Initialize
>    E$ = CHR$(27)
>    M$ = CHR$(3)
>    O$ = STRING$(5, CHR$(28)) + STRING$(6, CHR$(0))
>    I$ = STRING$(5, CHR$(252)) + STRING$(6, CHR$(0))

>    Zip$(1) = "00011"
>    Zip$(2) = "00101"
>    Zip$(3) = "00110"
>    Zip$(4) = "01001"
>    Zip$(5) = "01010"
>    Zip$(6) = "01100"
>    Zip$(7) = "10001"
>    Zip$(8) = "10010"
>    Zip$(9) = "10100"
>    Zip$(0) = "11000"

>    FOR Z = 0 TO 9
>      BarCode$(Z) = E$ + "*" + M$ + CHR$(55) + CHR$(0)
>      FOR I = 1 TO 5
>         C = VAL(MID$(Zip$(Z), I, 1))
>         IF C THEN
>            BarCode$(Z) = BarCode$(Z) + I$
>         ELSE BarCode$(Z) = BarCode$(Z) + O$
>         END IF
>      NEXT I
>   NEXT Z

>   ' Build BarCode
>   ' LINE INPUT "ZIP code: "; Zip$
> REM   FOR I = 1 TO 5
>       FOR I = 1 TO Ln
>         Z = VAL(MID$(Zip$, I, 1))
>         Sum = Sum + Z
>         BarCode$ = BarCode$ + BarCode$(Z)
>       NEXT I
>       CorrectionDigit$ = BarCode$((100 - Sum) MOD 10)
>       EndCode$ = E$ + "*" + M$ + CHR$(11) + CHR$(0) + I$
>       BarCode$ = EndCode$ + BarCode$ + CorrectionDigit$ + EndCode$
> REM  LPRINT E$; "E"; BarCode$; E$; "F"
>       PRINT #2, E$; "E"; BarCode$; E$; "F"
> END SUB

>    As my EPSON printer is LPT2 I had to change the LPRINT statements
> accordingly.

>    I would be very appreciative if someone might help me with this
> program problem.

> Thank you,
> Jim Roberts


I don't think a bar code supports 11 digits! Call in a bar code expert!


Fri, 07 Dec 2001 03:00:00 GMT  
 Post Net Bar Code printing

Quote:


>>    As my EPSON printer is LPT2 I had to change the LPRINT statements
>> accordingly.

>>    I would be very appreciative if someone might help me with this
>> program problem.

>> Thank you,
>> Jim Roberts

>I don't think a bar code supports 11 digits! Call in a bar code expert!

Nine digits + stop and start markers.  Try www.usps.gov for details.

Visit my source code page at http://www.mindspring.com/~johnecarter
Visit my favorite school at http://www.mindspring.com/~addison



Sun, 09 Dec 2001 03:00:00 GMT  
 Post Net Bar Code printing
The company that I work for sells a program called B-Coder for DOS
($99.00)  that prints Postnet bar codes to an Epson or compatible dot
matrix printer. The program is designed as a callable utility where
you call it with command line arguments. It also supports all versions
of postnet including 5, 9 or 11 digit postnet.
We also sell the source code for the program for $395. The program not
only prints postnet but it also supports all other standard linear bar
code symbologies as well. For more info, call our sales department at
800-722-6004 or you can call me directly at 215-763-5096

Tom Lutz

http://www.taltech.com

Quote:

>Hi,

>   I have been looking for a Post Net Bar Code program I can insert in
>one of my existing QB programs and print bar codes using an EPSON DM
>printer.  I finally found such a program and it works very well with a
>five digit zip code.  I tried to print an 11 digit code and it failed.
>I made a couple of changes I thought might work but had no luck.  This
>effort is not for profit, just a little project of my own.

>  Following is the listing of the program.  I used the phrase "REM"
>where I changed a statement.

>DECLARE SUB PostNet (Zip$)
>OPEN "LPT2:" FOR OUTPUT AS #2
>REM  PostNet "73159"
>PostNet "73159340816"

>SUB PostNet (Zip$)
>DIM Zip$(9), BarCode$(9)

>'   I added the following statement
>   Ln = LEN(Zip$)
>   IF Zip$ = "(Can)" OR Zip$ = "00000" THEN LPRINT : EXIT SUB
> ' Initialize
>   E$ = CHR$(27)
>   M$ = CHR$(3)
>   O$ = STRING$(5, CHR$(28)) + STRING$(6, CHR$(0))
>   I$ = STRING$(5, CHR$(252)) + STRING$(6, CHR$(0))

>   Zip$(1) = "00011"
>   Zip$(2) = "00101"
>   Zip$(3) = "00110"
>   Zip$(4) = "01001"
>   Zip$(5) = "01010"
>   Zip$(6) = "01100"
>   Zip$(7) = "10001"
>   Zip$(8) = "10010"
>   Zip$(9) = "10100"
>   Zip$(0) = "11000"

>   FOR Z = 0 TO 9
>     BarCode$(Z) = E$ + "*" + M$ + CHR$(55) + CHR$(0)
>     FOR I = 1 TO 5
>        C = VAL(MID$(Zip$(Z), I, 1))
>        IF C THEN
>           BarCode$(Z) = BarCode$(Z) + I$
>        ELSE BarCode$(Z) = BarCode$(Z) + O$
>        END IF
>     NEXT I
>  NEXT Z

>  ' Build BarCode
>  ' LINE INPUT "ZIP code: "; Zip$
>REM   FOR I = 1 TO 5
>      FOR I = 1 TO Ln
>        Z = VAL(MID$(Zip$, I, 1))
>        Sum = Sum + Z
>        BarCode$ = BarCode$ + BarCode$(Z)
>      NEXT I
>      CorrectionDigit$ = BarCode$((100 - Sum) MOD 10)
>      EndCode$ = E$ + "*" + M$ + CHR$(11) + CHR$(0) + I$
>      BarCode$ = EndCode$ + BarCode$ + CorrectionDigit$ + EndCode$
>REM  LPRINT E$; "E"; BarCode$; E$; "F"
>      PRINT #2, E$; "E"; BarCode$; E$; "F"
>END SUB

>   As my EPSON printer is LPT2 I had to change the LPRINT statements
>accordingly.

>   I would be very appreciative if someone might help me with this
>program problem.

>Thank you,
>Jim Roberts




Thu, 27 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Post Net Bar code printing on Epson action 5000 printer

2. Post Net Bar Code

3. Vb code to print 2D bar-code

4. Code to print 2D bar-code

5. Bar Code 39 printing on HP 5L

6. Printing Bar Codes in VB - Thanks

7. Printing Bar Codes

8. Printing Bar Codes in VB

9. Need Help Printing Bar Codes

10. HELP: Bar code Scanning and Printing

11. How to print Bar-Codes???

12. Print Tables and Bar Codes

 

 
Powered by phpBB® Forum Software