added image in qr-code or next to name - improvements

This commit is contained in:
Marc Wäckerlin
2025-11-08 17:30:48 +01:00
parent 9c4d85528a
commit 0f802a02a8
10 changed files with 120 additions and 14 deletions
+10 -9
View File
@@ -94,10 +94,10 @@ Layout options are set as options to the `\documentclass`, e.g.:
- `fill` or `nofill`: fill empty space between icon and text, default: `fill`
- `qrfirst` or `textfirst`: switch position of QR-Code and text block, default: `qrfirst`
- `https` or `www`: should links in the hints be prefixed with `https://` or `www.`, default: `https`
- `qreclevel=`: QR error correction level `L`, `M`, `Q`, or `H`, default: `Q`. Increase to `H` if you use `photoinqr=true` or expect minor print noise.
- `photoinqr` or `nophotoinqr`: place photo in the center of the QR code (`photoinqr`) instead of next to the name, default: `nophotoinqr`. **Requires `qreclevel=H` for reliable scanning**, as the photo occludes part of the QR code (~15% by default).
- `qrlogoscale=`: relative size of the photo overlay in QR code (when `photoinqr=true`), as fraction of QR code width, default: `0.15` (15%). Higher values may reduce scannability.
- `qrlogoborder=`: white padding around the photo overlay (when `photoinqr=true`), as fraction of QR code width, default: `0.02` (2%). Increases contrast and readability for scanners.
- `qreclevel=`: QR error correction level `L` (~7%), `M` (~15%), `Q` (~25%), or `H` (~30%), default: `Q`. Use `H` when `photoinqr=true`.
- `photoinqr` or `nophotoinqr`: place photo in the center of the QR code (`photoinqr`) instead of next to the name, default: `nophotoinqr`. **Requires `qreclevel=H` for reliable scanning**.
- `qrlogoscale=`: photo size in QR code as percentage of QR width (0-100), default: `25` (25% width = 6.25% area). Recommended values: Level H: 25-30%, Level Q: 20%, Level M: 15%, Level L: 10%. Higher values may reduce scannability.
- `qrlogoborder=`: transparent padding around photo in QR code as percentage of QR width (0-100), default: `2` (2%). Adds space between photo and QR modules.
Data Definitions
@@ -204,7 +204,7 @@ See [examples] for more examples.
Photo (optional)
================
You can add an optional photo that appears next to the name or in the center of the QR code. The photo is dynamically scaled to match the name line height (when next to name) or to 15% of the QR code size (when in QR).
You can add an optional photo that appears next to the name or in the center of the QR code. The photo is dynamically scaled to match the name line height (when next to name) or to 25% of the QR code width (when in QR).
```latex
\photo{path/to/photo.jpg}
@@ -220,15 +220,16 @@ You can add an optional photo that appears next to the name or in the center of
**Photo in QR code center:**
```latex
\documentclass[photoinqr,qreclevel=H]{businesscard-qrcode}
\documentclass[photoinqr,qreclevel=H,qrlogoscale=25]{businesscard-qrcode}
\photo{photo.jpg}
```
**Important:** When using `photoinqr=true`:
- Always use `qreclevel=H` (highest error correction) for reliable scanning
- Always use `qreclevel=H` (highest error correction ~30%) for reliable scanning
- Test QR code scannability with multiple apps before printing
- Start with `qrlogoscale=0.15` and `qrlogoborder=0.02`; if scanning fails, try `qrlogoscale=0.12` or `0.10`
- The photo is placed on a white rounded rectangle background to preserve contrast
- Default `qrlogoscale=25` (25% width = 6.25% area) is recommended for Level H
- If scanning fails, reduce to `qrlogoscale=20` or `qrlogoscale=15`
- PNG transparency is preserved - use images with transparent backgrounds for best results
Need More