def decodeFile(fileName): results = dbr.decodeFile(fileName, config.barcodeTypes) for result in results: print("barcode format: " + result[0]) print("barcode value: " + bytearray.fromhex(result[1]).decode('latin-1'))
def decodeFile(fileName): formats = 0x3FF | 0x2000000 | 0x8000000 | 0x4000000 # 1D, QRCODE, PDF417, DataMatrix results = dbr.decodeFile(fileName, formats, 'CUSTOM') for result in results: print("barcode format: " + result[0]) print("barcode value: " + result[1])
def upload(request): if request.method == 'POST': uploadedFile = handle_uploaded_file(request.FILES['RemoteFile'], str(request.FILES['RemoteFile'])) results = dbr.decodeFile(uploadedFile) return HttpResponse(results) return HttpResponse("Failed")
def readBarcode(self, filename): dbr.initLicense("Your License") results = dbr.decodeFile(filename, 0x3FF | 0x2000000 | 0x4000000 | 0x8000000 | 0x10000000) out = '' index = 0 for result in results: out += "Index: " + str(index) + "\n" out += "Barcode format: " + result[0] + '\n' out += "Barcode value: " + result[1] + '\n' out += '-----------------------------------\n' index += 1 self.results.setText(out)
def decodeFile(fileName): results = dbr.decodeFile(fileName, config.barcodeTypes) for result in results: print("barcode format: " + result[0]) print("barcode value: " + result[1])