コード例 #1
0
ファイル: test.py プロジェクト: zilnuken/python
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'))
コード例 #2
0
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])
コード例 #3
0
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")
コード例 #4
0
ファイル: barcode-reader.py プロジェクト: a954217436/python-1
    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)
コード例 #5
0
def decodeFile(fileName):
    results = dbr.decodeFile(fileName, config.barcodeTypes)

    for result in results:
        print("barcode format: " + result[0])
        print("barcode value: " + result[1])