qr_generator
Overview
The QR Generator module lets you create, manage, and host QR codes directly in Drupal with built-in redirection management.
Modes
Online QR codes — hosted in Drupal with automatic redirects and optional expiration.
Offline (self-contained) QR codes — embeds the full target data so it works without internet or a server.
Requirements
- PHP ^8.3
- Drupal Core ^10 or ^11
Dependencies
- Core: rest module
- Third-party: endroid/qr-code — QR code generation
— https://packagist.org/packages/endroid/qr-code
- Third-party: setasign/fpdf — PDF export
— https://packagist.org/packages/setasign/fpdf
Features
- Generate and export QR codes in PNG, SVG, and PDF.
- Create offline QR codes that work without a server or internet.
- Create online QR codes with redirects and optional expiry dates.
- Export any QR code via /admin/qr-code/export/{entityId}.
- Control size, margin, format, and validity period for each QR code.
Usage — Online QR code with redirect
1. Go to Content → QR Codes.
2. Add a QR code and set the redirect URL.
3. Open /admin/content/qr-code to view codes.
4. Click Export for the desired QR code.
5. Choose size, margin, and format, then download.
Workflow Online QR code
Scan QR code → lands on your Drupal site → automatic redirect → destination page.
Usage — Offline self-contained QR code
1. Go to Content → QR Codes.
2. Open the Generate Offline QR Code form.
3. Enter the full URL or data to embed.
4. Choose size, margin, and format.
5. Download the QR code; it works without internet.