3

I'm trying to build my business-card. Nothing over-special for a first one. On the back, there will be so a qrcode linking to my http://card.vcf.

On the front, my principals information on the center / left of the card, the right part (about 15-20 % of the right) will be with my logo (I'm thinking to use tabular for these separations, or makebox, haven't really thought about it untill now.) Anyway, before all that, i wish I had a background image... : I made it with gimp, quickly... probably nothing will be written on the blue. I want it to appear only on the front part of the business card : image of the business card size

Maybe to simplify I'll add on it my logo, since this background as the size of the business card.

The problem is : with my geometry, the blue won't appear where i'm waiting for him. If i comment the line about : \usepackage[]{geometry} .... i got an A4 format with my background.

I tried with : \usepackage{eso-pic} \usepackage{background} and also tryied a "\makebox" but I couldn't achieve with anyone. I leave them commented in the example code.

If somebody had an idea about what I am missing to make it works, the help would be really much appreciated.

\documentclass[10pt]{memoir}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{qrcode}
\usepackage[paperheight=5cm,paperwidth=9cm]{geometry}
\pagestyle{empty}
\usepackage{graphicx}

%\usepackage{background}
%\newcommand\BackImage[2][scale=1]{%
%\BgThispage\backgroundsetup{contents={\includegraphics[#1]{#2}}}

%\usepackage{eso-pic}
%\newcommand\BackgroundPic{%
%\put(0,0){%
\parbox[b][5cm]{9cm}{\vfill\centering\includegraphics[width=9cm,keepaspectratio]{160606-fond_carte_visite.png}\vfill}}}

\begin{document}
%\AddToShipoutPicture*{\BackgroundPic}
\makebox[0pt][l]{%
\raisebox{-\totalheight}[0pt][0pt]{%
\includegraphics[width=8.99cm,height=4.5cm]{160606-fond_carte_visite.png}}%}%
%\BackImage[width=\textwidth]{160606-fond\_carte\_visite.png}%

FirstName Lastname\\
Address\\

\newpage
\qrcode[height=15mm]{https://example.com/card.vcf}

\end{document}
franck
  • 95

2 Answers2

1

Like so?

\documentclass[10pt,landscape]{article}


\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}


\begin{document}



\begin{tikzpicture}[remember picture,overlay,shift={(current page.south west)}]
\node[anchor=south west] (0,0) {\includegraphics[width=\paperwidth,height=\paperheight]{pig}};
\end{tikzpicture}

\end{document}

I'm using landscape because that's the way my picture is oriented.

JPi
  • 13,595
  • It almost fit my needs. As for the moment there is only a blue line of 5-10mm at the bottom of my background image, I could notice that a margin (?) still exist between my blue line and the letf + bottom of the business card. I tried in the \usepackage[h=5mc,w=9cm, margin=0mm]{geometry} (and also tryied with [bottom=0mm,left=0mm] but it isn't working. I carry on looking for how to fix it – franck Jun 07 '16 at 14:10
1

With the help of @JPi and the answer to this question : Background image from tikzpicture does not fit the whole page, I made my background image fit the margin as I wish :

(...)
\usepackage[paperheight=5cm, paperwidth=9cm, left=0mm, bottom=0mm]{geometry}
(...)

\begin{tikzpicture}[remember picture,overlay,shift={(current page.center)}]
\node[inner sep=0] {\includegraphics[width=\paperwidth,height=\paperheight]{my_background.png}};
\end{tikzpicture}
franck
  • 95