User Tools

Site Tools


python:barcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python:barcode [2016/08/08 01:23] – [Example create Barcode with hubarcode] adminpython:barcode [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 33: Line 33:
 </code> </code>
 ==== Custom options in Encoder ==== ==== Custom options in Encoder ====
-Below are options for Code128Encoder:+Below are default options for Code128Encoder:
 <code python> <code python>
 self.options.get('show_label', True) self.options.get('show_label', True)
Line 41: Line 41:
 self.image_height = self.options.get('height') or (self.image_width / 3) self.image_height = self.options.get('height') or (self.image_width / 3)
 self.options.get('bottom_border', 0) self.options.get('bottom_border', 0)
 +</code>
 +Create Custom options:<code python>
 +options['height'] = 25
 +options['ttf_fontsize'] = 8
 +options['bottom_border'] = 2
 </code> </code>
python/barcode.1470619409.txt.gz · Last modified: 2022/10/29 16:15 (external edit)