fix build
@@ -5,9 +5,9 @@ What happens, if you give your visiting card to someone? Either he manually type
|
||||
|
||||
Other available visitingcard templates, such as [mschlenker] distribute the cards on an A4 paper. But if you want a professional printer, such as [onlineprinters], then you need to be able to generate a PDF with exactly one card, an exactly defined border and crop marks.
|
||||
|
||||
[](examples/john-doe-hongkong.tex)
|
||||
[](examples/peter-muster-example-company-zuerich.tex)
|
||||
[](examples/example.tex)
|
||||
[](examples/john-doe-hongkong.tex)
|
||||
[](examples/peter-muster-example-company-zuerich.tex)
|
||||
[](examples/example.tex)
|
||||
|
||||
|
||||
Features
|
||||
@@ -174,7 +174,7 @@ The card is designed for professional printing service, such as [onlineprinters]
|
||||
cutdist=2]
|
||||
{businesscard-qrcode}
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
Usage Example
|
||||
@@ -204,7 +204,7 @@ Save it as file [texstudio_d30266.tex] and compile it to get [texstudio_d30266.p
|
||||
|
||||
xelatex -synctex=1 -interaction=nonstopmode texstudio_d30266.tex
|
||||
|
||||

|
||||

|
||||
|
||||
See [examples] for more examples.
|
||||
|
||||
@@ -214,7 +214,7 @@ 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 25% of the QR code width (when in QR).
|
||||
|
||||
```latex
|
||||
\photo{path/to/photo.jpg}
|
||||
\photo{path/to/photo.png}
|
||||
```
|
||||
|
||||
### Photo Placement Options:
|
||||
@@ -222,13 +222,13 @@ You can add an optional photo that appears next to the name or in the center of
|
||||
**Default (photo next to name):**
|
||||
```latex
|
||||
\documentclass{businesscard-qrcode}
|
||||
\photo{photo.jpg}
|
||||
\photo{photo.png}
|
||||
```
|
||||
|
||||
**Photo in QR code center:**
|
||||
```latex
|
||||
\documentclass[photoinqr,qreclevel=H,qrlogoscale=0.25]{businesscard-qrcode}
|
||||
\photo{photo.jpg}
|
||||
\photo{photo.png}
|
||||
```
|
||||
|
||||
**Important:** When using `photoinqr=true`:
|
||||
@@ -241,7 +241,7 @@ You can add an optional photo that appears next to the name or in the center of
|
||||
**Large photo next to name:**
|
||||
```latex
|
||||
\documentclass[photoscale=2.5]{businesscard-qrcode}
|
||||
\photo{photo.jpg}
|
||||
\photo{photo.png}
|
||||
```
|
||||
|
||||
**Background color:**
|
||||
@@ -253,7 +253,7 @@ You can add an optional photo that appears next to the name or in the center of
|
||||
**Background image:**
|
||||
```latex
|
||||
\documentclass[bgscale=1.5,bgopacity=0.3,qrbgopacity=1.0]{businesscard-qrcode}
|
||||
\background{photo.jpg}
|
||||
\background{photo.png}
|
||||
```
|
||||
Note: Use `bgopacity` to fade the background (e.g., `0.2` or `0.3`) so text remains readable. The QR code has a white background by default (`qrbgopacity=1.0`) to ensure scannability.
|
||||
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
\RequirePackage{graphicx} % needed for optional photo
|
||||
\RequirePackage{tikz} % needed for logo overlay in QR code
|
||||
\RequirePackage{eso-pic} % needed for background images without layout impact
|
||||
% Fix XeLaTeX opacity issue: ensure TikZ/PGF is loaded before eso-pic uses opacity
|
||||
\DeclareHookRule{shipout/background}{pgfrcs}{>}{eso-pic}
|
||||
\RequirePackage[\content,top=\padding,left=\padding,right=\padding,bottom=\padding]{geometry}
|
||||
%\RequirePackage{pbox}
|
||||
\RequirePackage{varwidth}
|
||||
@@ -383,15 +385,15 @@ END:VCARD\BCQ@nl}
|
||||
\ifcsdef{Xbackground}{%
|
||||
\IfFileExists{\Xbackground}{%
|
||||
% It's an image file: add to background using eso-pic (no layout impact)
|
||||
% Fix XeLaTeX opacity issue: ensure TikZ/PGF is loaded before opacity is used
|
||||
\AddToHook{shipout/background}[businesscard]{%
|
||||
\put (\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}) {%
|
||||
\tikz[overlay]{\node[opacity=\fpeval{\BCQ@bgopacity}, inner sep=0pt] at (0,0) {%
|
||||
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
|
||||
};}%
|
||||
\AddToShipoutPictureBG*{%
|
||||
\AtPageCenter{%
|
||||
\begin{tikzpicture}[overlay]
|
||||
\node[inner sep=0pt, opacity=\fpeval{\BCQ@bgopacity}] at (0,0) {%
|
||||
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
|
||||
};
|
||||
\end{tikzpicture}%
|
||||
}%
|
||||
}%
|
||||
\DeclareHookRule{shipout/background}{pgfrcs}{>}{businesscard}%
|
||||
}{%
|
||||
% Not a file: treat as color
|
||||
\pagecolor{\Xbackground}%
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
\type{home}
|
||||
\givennames{Petra}
|
||||
\familynames{Test}
|
||||
\additionalnames{Example Company Ltd.}
|
||||
\street{Bildstrasse\ 99}
|
||||
\city{Basel}
|
||||
\zip{4000}
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
EXAMPLES = example \
|
||||
john-doe-hongkong \
|
||||
peter-muster-example-company-zuerich \
|
||||
special-papersize \
|
||||
photo-example \
|
||||
photo-in-qr-example \
|
||||
photo-large-example \
|
||||
background-color-example \
|
||||
background-image-example \
|
||||
test-country-short \
|
||||
texstudio_d30266
|
||||
|
||||
examplesdir = ${docdir}/examples
|
||||
dist_examples_DATA = $(EXAMPLES:%=%.tex) $(EXAMPLES:%=%.pdf)
|
||||
|
||||
%.pdf:%.tex
|
||||
xelatex -synctex=1 -interaction=nonstopmode $<
|
||||
|
||||
CLEANFILES = $(EXAMPLES:%=%.aux) $(EXAMPLES:%=%.log) $(EXAMPLES:%=%.synctex.gz)
|
||||
CLEANFILES = $(EXAMPLES:%=%.aux) $(EXAMPLES:%=%.log) $(EXAMPLES:%=%.synctex.gz) $(EXAMPLES:%=%.fdb_latexmk) $(EXAMPLES:%=%.fls) $(EXAMPLES:%=%.xdv)
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
% !TeX program = xelatex
|
||||
% Note: Requires photo.png in same directory
|
||||
\documentclass[bgscale=1.2,bgopacity=0.6,qrbgopacity=0.8,photoscale=4]{businesscard-qrcode}
|
||||
|
||||
\type{home}
|
||||
|
||||
|
Before Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -1,7 +1,7 @@
|
||||
screenshotdir=${docdir}/screenshots
|
||||
dist_screenshot_DATA=$(EXAMPLES:%=%.jpg)
|
||||
dist_screenshot_DATA=$(EXAMPLES:%=%.png)
|
||||
|
||||
%.jpg:${top_srcdir}/examples/%.pdf
|
||||
%.png:${top_srcdir}/examples/%.pdf
|
||||
convert -density 200 -quality 90 $< $@
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
|
||||
|
Before Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 20 KiB |