Skip to content

Add QR code support to bulk label generation#8

Merged
emares17 merged 3 commits into
mainfrom
feature/qr-code-bulk-generation
Apr 22, 2026
Merged

Add QR code support to bulk label generation#8
emares17 merged 3 commits into
mainfrom
feature/qr-code-bulk-generation

Conversation

@emares17

@emares17 emares17 commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Users can now select Code 128 or QR Code as the barcode type before generating label sheets
  • QR codes render as native ReportLab vector graphics (QrCodeWidget) - no new dependencies, no PNG intermediate, same performance as Code 128
  • barcode_type is threaded through the full pipeline: upload route -> label service -> PDF sheet generator -> barcode generator
  • Invalid barcode_type values from the frontend default to code128 for safety

Files changed

  • backend/utils/BarcodeGenerator.py - QR drawing logic via QrCodeWidget, calibrate() skipped for QR (self-sizing)
  • backend/utils/PDFSheetGenerator.py - barcode_type param added to generate_pdf_sheets()
  • backend/services/label_service.py - barcode_type param added to process_label_file()
  • backend/routes/uploads.py - extracts and validates barcode_type from form data
  • frontend-vite/react-ts/src/components/labelUploader.tsx - barcode type toggle UI + appended to formData

Test plan

  • Upload a CSV, select QR Code, generate - confirm PDF shows QR codes
  • Scan a generated QR label with a phone - confirm it resolves to the correct value
  • Switch back to Code 128 on the same file - confirm existing behavior unchanged
  • Test all 4 label templates with QR selected - confirm QR codes are centered and text lines appear below
  • Test with a long string value - confirm QR still fits within label bounds

Generated with Claude Code

Users can now select QR Code as the barcode type alongside Code 128
when generating label sheets. QR codes render as native ReportLab
vector graphics via QrCodeWidget — no new dependencies, same pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@railway-app

railway-app Bot commented Apr 22, 2026

Copy link
Copy Markdown

🚅 Deployed to the BarcodeGenerator-pr-8 environment in LabelGenius

Service Status Web Updated (UTC)
LabelGenius-Backend ✅ Success (View Logs) Web Apr 22, 2026 at 9:14 pm
LabelGenius-Frontend ✅ Success (View Logs) Web Apr 22, 2026 at 9:14 pm

@railway-app
railway-app Bot temporarily deployed to LabelGenius / BarcodeGenerator-pr-8 April 22, 2026 19:40 Destroyed
Rejects unrecognized barcode types before any file processing occurs
rather than wasting compute generating an unintended result.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to LabelGenius / BarcodeGenerator-pr-8 April 22, 2026 19:59 Destroyed
QR codes now size to available label space instead of barcode_height_inches.
94233 template margins, label dimensions, and gaps updated to align with
the physical Avery 94233 label sheet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to LabelGenius / BarcodeGenerator-pr-8 April 22, 2026 21:11 Destroyed
@emares17
emares17 merged commit dacf51b into main Apr 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant