parameters: (self, code, bc, width=255, height=2, pos='below', font='a')
docstring: Print Barcode
docstring_summary: Print Barcode
docstring_tokens: Print Barcode
function: def barcode(self, code, bc, width=255, height=2, pos='below', font='a'):
          """ Print Barcode """
          # Align Bar Code()
          self._raw(TXT_ALIGN_CT)
          # Height
          if height >=2 or height <=6:
              self._raw(BARCODE_HEIGHT)
          else:
              raise BarcodeSizeError()
          # Width
          if width >= 1 or width <=255:
              self._raw(BARCODE_WIDTH)
          else:
              raise BarcodeSizeError()
          # Font
          if font.upper() == "B":
              self._raw(BARCODE_FONT_B)
          else: # DEFAULT FONT: A
              self._raw(BARCODE_FONT_A)
          # Position
          if pos.upper() == "OFF":
              self._raw(BARCODE_TXT_OFF)
          elif pos.upper() == "BOTH":
              self._raw(BARCODE_TXT_BTH)
          elif pos.upper() == "ABOVE":
              self._raw(BARCODE_TXT_ABV)
          else:  # DEFAULT POSITION: BELOW 
              self._raw(BARCODE_TXT_BLW)
          # Type 
          if bc.upper() == "UPC-A":
              self._raw(BARCODE_UPC_A)
          elif bc.upper() == "UPC-E":
              self._raw(BARCODE_UPC_E)
          elif bc.upper() == "EAN13":
              self._raw(BARCODE_EAN13)
          elif bc.upper() == "EAN8":
              self._raw(BARCODE_EAN8)
          elif bc.upper() == "CODE39":
              self._raw(BARCODE_CODE39)
          elif bc.upper() == "ITF":
              self._raw(BARCODE_ITF)
          elif bc.upper() == "NW7":
              self._raw(BARCODE_NW7)
          else:
              raise BarcodeTypeError()
          # Print Code
          if code:
              self._raw(code)
              # We are using type A commands
              # So we need to add the 'NULL' character
              # https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444
              self._raw('\x00')
          else:
              raise BarcodeCodeError()
function_tokens: def barcode ( self , code , bc , width = 255 , height = 2 , pos = 'below' , font = 'a' ) : # Align Bar Code() self . _raw ( TXT_ALIGN_CT ) # Height if height >= 2 or height <= 6 : self . _raw ( BARCODE_HEIGHT ) else : raise BarcodeSizeError ( ) # Width if width >= 1 or width <= 255 : self . _raw ( BARCODE_WIDTH ) else : raise BarcodeSizeError ( ) # Font if font . upper ( ) == "B" : self . _raw ( BARCODE_FONT_B ) else : # DEFAULT FONT: A self . _raw ( BARCODE_FONT_A ) # Position if pos . upper ( ) == "OFF" : self . _raw ( BARCODE_TXT_OFF ) elif pos . upper ( ) == "BOTH" : self . _raw ( BARCODE_TXT_BTH ) elif pos . upper ( ) == "ABOVE" : self . _raw ( BARCODE_TXT_ABV ) else : # DEFAULT POSITION: BELOW  self . _raw ( BARCODE_TXT_BLW ) # Type  if bc . upper ( ) == "UPC-A" : self . _raw ( BARCODE_UPC_A ) elif bc . upper ( ) == "UPC-E" : self . _raw ( BARCODE_UPC_E ) elif bc . upper ( ) == "EAN13" : self . _raw ( BARCODE_EAN13 ) elif bc . upper ( ) == "EAN8" : self . _raw ( BARCODE_EAN8 ) elif bc . upper ( ) == "CODE39" : self . _raw ( BARCODE_CODE39 ) elif bc . upper ( ) == "ITF" : self . _raw ( BARCODE_ITF ) elif bc . upper ( ) == "NW7" : self . _raw ( BARCODE_NW7 ) else : raise BarcodeTypeError ( ) # Print Code if code : self . _raw ( code ) # We are using type A commands # So we need to add the 'NULL' character # https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444 self . _raw ( '\x00' ) else : raise BarcodeCodeError ( )