Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate Intelligent Mail® Barcode (OneCode) via PHP

I have a request to provide CASS certificated addresses on a PDF document. This involves using a certified mailing address, and needs to be printed using the barcode.

How can I generate such a barcode? Might exists PHP libraries that already does this?

like image 798
Pentium10 Avatar asked Dec 13 '22 15:12

Pentium10


2 Answers

One thing to remember is that certification on a CASS-certified address expires after 95 days. This means that you will need to recertify your (or your client's) database about every three months on a minimum. Without that, you can't generate an IMB (intelligent mail barcode) because the IMB is composed of a number of elements including the 12-digit delivery point barcode.

I would imagine that you already have a place to certify your addresses, but for those who read this Stack Overflow question and don't have certified and standardized addresses, you can do a Google search and find a handful of providers.

In the interest of full disclosure, I'm the founder of SmartyStreets. We offer address verification and validation which gives back the 12-digit delivery point barcode from which the IMB is derived. I would be happy to personally answer any additional codes you have related to address verification and standardization.

like image 177
Jonathan Oliver Avatar answered Dec 15 '22 04:12

Jonathan Oliver


The tc-lib-barcode (https://github.com/tecnickcom/tc-lib-barcode) PHP software library allows you to generate "IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200" barcodes.

The source code is fully PSR-2 compliant and can be easily added to your PHP projects using Composer.

The original code has been ported and refactored from TCPDF and already used in billions of documents.

like image 44
Nicola Asuni Avatar answered Dec 15 '22 04:12

Nicola Asuni