Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PostOffice Intelligent Barcodes
Message
 
À
08/03/2017 09:22:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01648854
Message ID:
01648876
Vues:
146
>Hello--
>
>Has anyone worked with the USPS Intelligent Barcodes with VFP? I am now needing to add this support and looking at options and ways to incorporate this functionality. Any advice or sample code would be greatly appreciated.
>
>Greg


I never implemented it, however, I did some research into it. Here are my notes, hopefully they are helpful:

There are two ttf fonts:
USPSIMBCompact.ttf
USPSIMBStandard.ttf

And there is a C dll encoder:
usps4cb.dll
libusps4cb.a

You use the encoder to come up with a string that looks like this:
FFTTDAADTTADTFDDFDDTFAFATDTDDFDAFDADDADDAFAAAFTTFTFDTFAAADADDDFDF

which is then used with the font to print the barcode.

The encoder can be called like this:

DECLARE USPS4CB In c:\myfolder\usps4cb.dll string TrackPtr, string RoutePtr, string BarPtr

Local lcTrack, lcRoute, lcBar
lcTrack = "53379777234994544928"+chr(0)

** this is zipcode
** zip = 5
** or zip+4 = 5+4
** or with delivery point = 5+4+2
lcRoute = "51135759461"+chr(0)

lcBar = space(65)+chr(0)

RetCode = USPS4CB(lcTrack,lcRoute,@lcBar)
? "Return Code:",RetCode
? "Bar:", lcBar


The Tracking Code string (TrackString) contains 20 digits in the following form:

AASSSCCCCCCNNNNNNNNN
where:

AA is the 2-digit barcode Identifier. The second digit must be 0, 1, 2, 3, or 4.

SSS is the 3-digit Service Type Identifier code.

CCCCCC is the 6-digit Mailer Identifier.

NNNNNNNNN is the 9-digit Serial Number.

Please note that the Mailer ID can be a 6-digit or 9-digit number based upon mailer’s volume. Since the Mailer ID and Serial Number are interdependent, the Serial Number is a 6-digit or 9-digit number depending on the length of the Mailer ID. If the Mailer ID is 6 digits, the Serial Number must be 9 digits. If the Mailer ID is 9 digits, there are 6 digits available for the Serial Number.


the Service type Identifiers can be found here:
http://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/stid.pdf

It appears that the serial # just needs to be unique. Start from 1 and increment.
Brandon Harker
Sebae Data Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform