QR Code Export Form

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

  1. Require the module via Composer: composer require drupal/qr_generator
  2. Enable the module via Drush (drush en qr_generator) or the Extend UI.
  3. Clear caches.

Usage — Online QR code with branding

  1. Go to Content → QR Codes.
  2. Add a QR code; set the redirect URL and (optionally) an expiry date.
  3. In the list view, click Export in the Operations column.
  4. Choose logo, colors, label, format, and size.
  5. Submit the form to download the file.

Usage — Offline (self-contained) QR code

  1. Go to Content → QR Codes.
  2. Click Generate Offline QR Code.
  3. Enter the target data (URL, email, or plain text) to embed.
  4. Configure branding and technical parameters.
  5. Download — the resulting code works independently of your Drupal site.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • chart icon56 sites report using this module
  • Created by m.evans on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases