qr_generator
58 sites
Security covered
Overview
QR Generator lets you create, manage, and host QR codes directly in Drupal. It supports both online QR codes (managed redirects with optional expiration) and offline, self-contained QR codes that embed the target data directly and work without an internet connection.
Features
- Multiple export formats: PNG, SVG, and PDF.
- Branding with logos: embed an uploaded image or external URL into the center of the code.
- Custom labels: add descriptive text (e.g., "Scan Me") below the code.
- Color customization: full Hex control over foreground and background colors.
- Error correction levels: Low, Medium, Quartile, High — automatically raised to High when a logo is used.
- Optional expiration dates for online QR codes.
- Per-entity export form at
/admin/qr-code/export/{entityId}.
How online QR codes work
Scan QR code → lands on your Drupal site (/api/qr-code/{uuid}) → automatic redirect → destination page.
Which version should I use?
Quick answer: use 2.0.x for new sites on Drupal 10.3+ or 11.x. Use 1.0.x only if your site runs an older, unsupported Drupal release.
1.0.x 2.0.x (recommended) Drupal Core ^10 || ^11 (10.0 → 11.x) ^10.3 || ^11 PHP 8.1 or higher 8.3 or higher (tested on PHP 8.4) Architecture Procedural hooks, entity annotations OOP hook implementations (#[Hook]), attribute-based entity definitions
Best for
Sites on EOL Drupal 10.0 / 10.1 / 10.2
New installations and modern Drupal sites
Requirements
2.0.x (recommended):
- PHP 8.3 or higher (fully tested on PHP 8.4)
- Drupal Core ^10.3 || ^11
1.0.x:
- PHP 8.1 or higher
- Drupal Core ^10 || ^11
Dependencies
- Drupal core modules:
rest,serialization - endroid/qr-code (^5.0 || ^6.0) — QR code generation
- setasign/fpdf (^1.8) — PDF export support
Installation
- Require the module via Composer:
composer require drupal/qr_generator - Enable the module via Drush (
drush en qr_generator) or the Extend UI. - Clear caches.
Usage — Online QR code with branding
- Go to Content → QR Codes.
- Add a QR code; set the redirect URL and (optionally) an expiry date.
- In the list view, click Export in the Operations column.
- Choose logo, colors, label, format, and size.
- Submit the form to download the file.
Usage — Offline (self-contained) QR code
- Go to Content → QR Codes.
- Click Generate Offline QR Code.
- Enter the target data (URL, email, or plain text) to embed.
- Configure branding and technical parameters.
- Download — the resulting code works independently of your Drupal site.