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
Last revisionBoth sides next revision
python:barcode [2016/08/07 23:40] – [Python Barcode] adminpython:barcode [2016/08/09 00:03] – [Custom options in Encoder] admin
Line 1: Line 1:
 ====== Python Barcode ====== ====== Python Barcode ======
 refer: refer:
 +  * https://github.com/hudora/huBarcode
   * https://sourceforge.net/projects/dmsbarcodegener/   * https://sourceforge.net/projects/dmsbarcodegener/
-  *  
 ===== huBarcode ===== ===== huBarcode =====
 refer: https://github.com/hudora/huBarcode refer: https://github.com/hudora/huBarcode
Line 32: Line 32:
 ImportError: No module named Image ImportError: No module named Image
 </code> </code>
 +==== Custom options in Encoder ==== 
 +Below are default options for Code128Encoder: 
 +<code python> 
 +self.options.get('show_label', True) 
 +self.options.get('ttf_fontsize', default_fontsize) 
 +self.options.get('ttf_font'
 +self.options.get('label_border', 0) 
 +self.image_height = self.options.get('height') or (self.image_width / 3) 
 +self.options.get('bottom_border', 0) 
 +</code> 
 +Create Custom options:<code python> 
 +options['height'] = 25 
 +options['ttf_fontsize'] = 8 
 +options['bottom_border'] = 2 
 +</code>
python/barcode.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1