Refactor barcode extraction and enhance PDF processing capabilities
- Added extract_barcodes_from_pdf function to read barcodes from PDF files using fitz. - Updated read_datamatrix_zxing to return both the barcode text and its Base64 representation. - Modified main execution block to include PDF barcode extraction. - Improved image loading for better compatibility with zxing. - Updated requirements.txt to include pymupdf for PDF processing.
This commit is contained in:
@@ -407,8 +407,8 @@ if __name__ == "__main__":
|
||||
data = read_datamatrix_zxing(image_path)
|
||||
# Замените своими боевыми Base64 строками
|
||||
mock_base64_list = [
|
||||
read_datamatrix_zxing(image_path),
|
||||
read_datamatrix_zxing(image_path)
|
||||
read_datamatrix_zxing(image_path)[1],
|
||||
read_datamatrix_zxing(image_path)[1]
|
||||
]
|
||||
|
||||
process_batch(
|
||||
|
||||
Reference in New Issue
Block a user