Create pdf417 barcode by special font without using images.
Python version | 3.3+ |
License | LGPLv3 |
PyPI | https://pypi.python.org/pypi/pdf417as_str/ |
- Install font pdf417.ttf into your OS.
- Encode your data string into special encoded strings.
pdf417_encoded_text = pdf417as_str.encode417('https://github.com', columns=5)
- Paste encoded text into any text editor.
+*xfs*prA*kuk*iDo*ixA*sxn*xdw*- +*yog*slv*Arv*Fyg*tgE*fwg*zew*- +*uny*BCj*iaw*jcE*AxD*ykx*pDw*- +*ftw*sgf*AoC*dAc*ajb*ofA*yrx*-
- Choose "Code PDF417" font for text and adjust line spacing. You will receive pdf417 barcode.
NOTE: Small empty space between rows not affects to reading barcode. Anyway you can find suited size.
Also you can make .png barcode using pdf417as_str.convert.to_png, but this function for tests and not efficient.
$ pip install pdf417as-str
- Original code on VisualBasic and "Code PDF417" font: Bazin Jean-Marie
- Porting to python, writing tests: I'm