I need to create an Code128 Barcodes with Python/Django which have to be embeded in HTML document.
I don’t want to make any temporary (or cache) files on the disk. That’s why I want to embed them as Data URI Scheme.
The result have to be something like this:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot">
Can you recommend me an easy way to do this?
Now I use ReportLab to create such a barcodes and embed them in PDF files, but I don’t know how to export them as Data URI Scheme. If this is the recommended way to do this.
This is my own solution:
And also you can get barcode rotated by 90°:
Here is an example result:
http://pastehtml.com/view/ci7qei4k1.html