tikz add tag
Joseph
I made up a simple business card with a standard size. However, when I open the pdf, it's 1.5mm larger (height and width).
I've tried to change `geometry` settings but to no avail.

````
\documentclass[tikz]{standalone}
%\usepackage[margin=0pt,paperwidth=80mm,paperheight=50mm,pass,noheadfoot]{geometry}
\usepackage{tikzpagenodes}
\usetikzlibrary{arrows.meta,shapes.geometric,shadows,shadings}
\usepackage{xcolor-material}
\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont{Alegreya}

\tikzstyle{linha} = [line width=7pt,MaterialGrey300]
\tikzstyle{linhafina} = [line width=3pt,MaterialGrey300]
\tikzstyle{bola} = [inner sep=0pt,minimum size=0pt]
% yes, I know \tikzstyle is oudated, it's just easier to type.

\colorlet{cinza}{MaterialGrey300}


\pagestyle{empty}


\begin{document}
\begin{tikzpicture}
[every node/.append style={text=MaterialGrey800, 
%	font=\Huge
},
\node[opacity=.6,overlay,inner sep=0pt] (figura) 
%at (current page.center) 
{\includegraphics[width=8cm,height=5cm]{example-image-a}};	
\draw[line width=4pt,MaterialRed900%,fill=MaterialGrey300
%rounded corners=12pt
] (figura.south west) rectangle (figura.north east);
\node[yshift=1.5cm] (texto) at (figura.center)
 {\itshape \LARGE John Doe};
\node[below= 3pt of texto,overlay] (prof) {\scshape \large o\,r\,i\,o\,n};
\node[xshift=6pt,yshift=6pt,
align=left,anchor=south west,fill=white,opacity=.5,
text opacity=1,
rectangle,draw,rounded corners=2pt] (address) at (figura.south west) {\small Contact:\\e-mail: --- \\ website};
\end{tikzpicture}
\end{document}
````

It's all good, but when I open the pdf in Acrobat Reader, the size is slightly larger (1.5mm):

![Anotação 2020-09-01 082848.png](/image?hash=6631d2b44965d7c9154cd0f0ac3011aa0fc26d929a5d694ca100c9b64ba0ab8f)
Top Answer
samcarter
The additional size has two causes:

- the main reason is the red rectangle. By default tikz draws the middle of the line at the position you specify, so 2pt will be outside on each side, adding up to an additional 4pt as visualized in the following sketch: 

  ![Screen Shot 2020-09-01 at 15.07.48.png](/image?hash=66fabfbc65c1551cfe24dab6cfd990bf52fff31449ebd0766516b3d36f40366f)

   You can work around this problem by clipping the document to the size of the image



- the `outer sep` around nodes also contributes a bit

(and there is a `]` missing in the `tikzpicture`)

```
% !TeX TS-program = xelatex

\documentclass[tikz]{standalone}
%\usepackage[margin=0pt,paperwidth=80mm,paperheight=50mm,pass,noheadfoot]{geometry}
\usepackage{tikzpagenodes}
\usetikzlibrary{arrows.meta,shapes.geometric,shadows,shadings}
\usepackage{xcolor-material}
\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont{Alegreya}

\tikzstyle{linha} = [line width=7pt,MaterialGrey300]
\tikzstyle{linhafina} = [line width=3pt,MaterialGrey300]
\tikzstyle{bola} = [inner sep=0pt,minimum size=0pt]
% yes, I know \tikzstyle is oudated, it's just easier to type.

\colorlet{cinza}{MaterialGrey300}


\pagestyle{empty}


\begin{document}
\begin{tikzpicture}
[every node/.append style={text=MaterialGrey800, 
%	font=\Huge
},
outer sep=0pt,
] % <- was missing


\node[opacity=.6,overlay,inner sep=0pt] (figura) 
at (current page.center) 
{\includegraphics[width=8cm,height=5cm]{example-image-a}};

\clip (figura.south west) rectangle (figura.north east);

	
\draw[line width=4pt,MaterialRed900%,fill=MaterialGrey300
%rounded corners=12pt
] (figura.south west) rectangle (figura.north east);
\node[yshift=1.5cm] (texto) at (figura.center)
 {\itshape \LARGE John Doe};
\node[below= 3pt of texto,overlay] (prof) {\scshape \large o\,r\,i\,o\,n};
\node[xshift=6pt,yshift=6pt,
align=left,anchor=south west,fill=white,opacity=.5,
text opacity=1,
rectangle,draw,rounded corners=2pt] (address) at (figura.south west) {\small Contact:\\e-mail: --- \\ website};
\end{tikzpicture}
\end{document}
```
This gives a size of 8.01 cm times 5cm (I think the 0.01 cm is just a rounding problem)

![Screen Shot 2020-09-01 at 15.09.23.png](/image?hash=07c509575083ded225dd5bd5bb656d8c8c4977abc8c6c5b00d7369dfb81318a2)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.