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:
2026-02-21 12:42:17 +03:00
parent 93b28b1ea2
commit 3f8e6935a8
4 changed files with 128 additions and 12 deletions

View File

@@ -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(