Skip to content
Snippets Groups Projects
Commit 41d6740b authored by Joseph Weston's avatar Joseph Weston
Browse files

report correct PDF page numbers

Previously we were using zero-based indexing, which is confusing.
parent cb0d527b
No related branches found
No related tags found
No related merge requests found
......@@ -85,9 +85,10 @@ def process_pdf(pdf_id):
report_error('PDF is not from this exam')
return
# Process individual pages
# Process individual pages, ensuring we report the page numbers
# starting from 1.
failures = []
for i, (image, qr) in enumerate(zip(images, extracted_qrs)):
for i, (image, qr) in enumerate(1, zip(images, extracted_qrs)):
report_progress(f'Processing page {i} / {len(images)}')
if qr is None:
failures.append(image)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment