Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created June 24, 2026 05:18
Show Gist options
  • Select an option

  • Save aspose-com-gists/aa75954fbaf204c2cb5d535fd8896188 to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-gists/aa75954fbaf204c2cb5d535fd8896188 to your computer and use it in GitHub Desktop.
Read Barcode from Multi Page TIFF Image in Python

Read Barcode from Multi Page TIFF Image in Python

Learn to extract barcodes from multi page TIFF files in Python with Aspose.BarCode for Python via .NET. The guide covers loading TIFF pages, decoding barcodes, efficient handling of large documents, performance tuning, code examples, and setup steps.

Read the full guide here: https://blog.aspose.com/barcode/read-barcode-from-multi-page-tiff-image-in-python/

import asposebarcode as barcode
def read_barcodes_from_multipage_tiff(tiff_path):
# Initialize the barcode reader for all supported types
reader = barcode.BarCodeReader(tiff_path, barcode.DecodeType.ALL_SUPPORTED)
page_index = 0
while reader.read_page(page_index):
print(f"--- Page {page_index + 1} ---")
# Iterate over all barcodes found on the current page
for result in reader.read():
print(f"Symbology : {result.symbology_type}")
print(f"Code Text : {result.code_text}")
page_index += 1
# Clean up native resources
reader.close()
if __name__ == "__main__":
tiff_file = "sample_multipage.tiff"
read_barcodes_from_multipage_tiff(tiff_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment