qr_generator
Overview
The QR Generator module lets you create, manage, and host QR codes directly in Drupal with built-in redirection management, branding options, and advanced export controls.
Modes
Online QR codes — Hosted in Drupal with automatic redirects, usage tracking, and optional expiration.
Offline (self-contained) QR codes — Embeds the full target data (URL or text) directly into the code so it works without an internet connection or a Drupal server.
Requirements
- PHP ^8.3 (Fully tested on PHP 8.4)
- Drupal Core ^10 or ^11
Dependencies
- Core: rest and serialization modules
- Third-party: endroid/qr-code (^5.0 or ^6.0) — QR code generation
- Third-party: setasign/fpdf (^1.8) — PDF export support
New Features (1.0.3)
- Branding with Logos: Upload an image or provide a URL to embed your company logo directly into the center of the QR code.
- Custom Labels: Add descriptive text labels (e.g., "Scan Me") below the QR code.
- Color Customization: Full support for custom foreground and background colors using Hex codes.
- Advanced Export Settings: Precision control over pixel size, margins, and Error Correction Levels (Low, Medium, Quartile, High).
Usage — Online QR code with Branding
1. Go to Content → QR Codes.
2. Add a QR code, set the redirect URL, and (optional) an expiry date.
3. In the Operations column of the list, click Export.
4. In the Export form, select your logo, colors, and label.
5. Choose your desired format and download.
Usage — Offline self-contained QR code
1. Go to Content → QR Codes.
2. Click the Generate Offline QR Code action button.
3. Enter the target data (URL, email, or plain text) to embed.
4. Choose your branding (logo, colors, label) and technical parameters.
5. Download the result; this code functions independently of your Drupal site.
Workflow Online QR code
Scan QR code → lands on your Drupal site (/api/qr-code/{uuid}) → automatic redirect → destination page.