added image in qr-code or next to name
This commit is contained in:
36
README.md
36
README.md
@@ -38,6 +38,7 @@ Copy `businesscard-qrcode/businesscard-qrcode.cls` to your LaTeX class path. Sim
|
||||
```bash
|
||||
mkdir ~/texmf/tex/latex/businesscard-qrcode
|
||||
cp businesscard-qrcode/businesscard-qrcode.cls ~/texmf/tex/latex/businesscard-qrcode/
|
||||
ln -s ~/texmf/tex/latex ~/texmf/tex/xelatex
|
||||
```
|
||||
|
||||
|
||||
@@ -46,6 +47,8 @@ Compilation
|
||||
|
||||
**Important:** You must use **`xelatex`** for compilation, because `xelatex` properly supports UTF-8 (e.g. needed for german umlauts or chinese characters). The package `inputenc` messes up with package `qrcode`.
|
||||
|
||||
Note for iOS: vCard content inside the QR now uses CRLF line endings (per spec) to improve import robustness on iOS without changing the vCard version (still 4.0 by default). Also the QR error correction level can be configured.
|
||||
|
||||
|
||||
Document Structure
|
||||
------------------
|
||||
@@ -91,6 +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.
|
||||
|
||||
|
||||
Data Definitions
|
||||
@@ -194,6 +201,35 @@ Save it as file [texstudio_d30266.tex] and compile it to get [texstudio_d30266.p
|
||||
|
||||
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).
|
||||
|
||||
```latex
|
||||
\photo{path/to/photo.jpg}
|
||||
```
|
||||
|
||||
### Photo Placement Options:
|
||||
|
||||
**Default (photo next to name):**
|
||||
```latex
|
||||
\documentclass{businesscard-qrcode}
|
||||
\photo{photo.jpg}
|
||||
```
|
||||
|
||||
**Photo in QR code center:**
|
||||
```latex
|
||||
\documentclass[photoinqr,qreclevel=H]{businesscard-qrcode}
|
||||
\photo{photo.jpg}
|
||||
```
|
||||
|
||||
**Important:** When using `photoinqr=true`:
|
||||
- Always use `qreclevel=H` (highest error correction) 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
|
||||
|
||||
|
||||
Need More
|
||||
=========
|
||||
|
||||
Reference in New Issue
Block a user