Any good pdf417 barcode libraries for Python?

I am looking for a good python module for creating pdf417 barcodes. Has anyone used the one they liked?

Ideally, I would like to have as few dependencies as possible, and the other for both Linux and MacOSX.

+4
source share
3 answers

We recently had to approach this issue, and as a Python store, we wanted a Python solution. It became clear that elaphe was a project that had the potential to actually execute the pdf 417 barcode.

However, we found that these were errors by today's standards, and so we introduced a hunt to fix the library. It turns out that elaphe should generate an obsolete * .eps post script form that cannot be interpreted by a ghost script, and this will cause barcode generation to fail.

Fortunately, elphae uses the Barcode Writer shared library behind the scenes at Pure PostScript @ http://bwipp.terryburton.co.uk

This shared backend library, which has many projects in several languages, uses it to generate projects. The fix, especially for us, was for the elaphe plug, and fix it * .eps file generation.

To determine what is broken in * .eps, look at this other site created using postscriptbarcode and it will allow you to create the pdf417 barcode online (as well as other formats): http://www.terryburton.co.uk/ barcodewriter / generator /

Once you create the pdf417 barcode, it gives you the option to download the .png, .jpg and YES.eps file!

Using this .eps file, you can pass it to a ghost script and adjust the settings to get the exact pdf417 barcode you are looking for. Then take this result and integrate it into the elaphe library and actually get a transfer request for this thing ....

It seems to be a little work, but nothing that could not be knocked out during the day. This is the perfect solution to get the elaphe library back in shape to create them without making this improvement.

Please note that the performance of this approach for us is a few seconds to generate this barcode because it creates an eps 2000 line file and passes it to a ghost script that generates another image file, which we send back the final result barcode. This is not as good as code128 with reportlab.

Perhaps a place for optimization: is there a pillow faster than PIL? Do we need all parts of an eps file to create a pdf417 barcode? Other optimization methods?

Anyway, the big question is Ken and I hope you find this to be a great answer.

+7
source

I assume that the elaphe reported by Matteius in 2013 has been fixed since the issue and commit logs have been showing pdf417 updates since then.

Anyway, now there are several other options (got a list with pip search elaphe or pip search pdf417 ):

  • elaphe ;
  • elaphe3 (fork elaphe tested on python3 );
  • candybar (no documentation? also a web service );
  • pdf417gen ;
  • treepoem (pro name: barcode β†’ bark ode β†’ tree poem = D) - change: do not dig the problem, but today the PDF417 generation seems broken.

All but pdf417gen support several types of barcodes.

Note that the bwipp documentation (on which elaphe and treepoem are based) only mentions 5 error correction levels (1 to 5), and pdf417gen claims to support security levels (0 to 8).

+2
source

Reportlab has an extension called rlbarcode, but this does not include support for pdf417 codes. I do not know of any other extensions for reportlab, including pdf417 barcode support.

In any case, if you are interested in generating pdf417 codes from python, you may be interested in this project: elaphe .

I still have not tested it (in fact I need to create pdf417 from python and I found this thread as well as the elaphe project page). I am going to download elaphe tools to test it right now.

0
source

All Articles