python을 활용한 바코드 만들기
from barcode import EAN13
from barcode.writer import ImageWriter
code_number= '112233445566'
#12 digit for barcode number
img_code= EAN13(code_number, writer=ImageWriter())
#EAN 13 type barcode
img_code.save("bar_code2_png")
# save it with any desired name -auto png file formatEAN-13 Last digit check sum method
12-digit numbers Odd numbers multiplied by 1 and tail numbers multiplied by 3 and added together..
ex)
1 1 2 2 3 3 4 4 5 5 6 6
1 3 1 3 1 3 1 3 1 3 1 3
1 + 3 + 2 + 6 + 3 + 9 + 4 + 12 + 5 + 15 + 6 + 18 = 84
check sum= mod(10 - mod( 84 , 10), 10) = 6
full barcode number =1122334455666
댓글 없음:
댓글 쓰기