You rectangle larger than the paper by \pgflinewidth
since the upper point for rectangle is at (\paperwidth,\paperheight)
. You can either
- use
fill
instead of filldraw
→ \fill[color=blue,use as bounding box] (0,0) rectangle (\paperwidth,\paperheight);
- or use
($(\paperwidth,\paperheight)+(-\pgflinewidth,-\pgflinewidth)$)
in the construction of rectangle. This needs calc
library. → \filldraw[color=blue,use as bounding box] (0,0) rectangle ($(\paperwidth,\paperheight)+(-\pgflinewidth,-\pgflinewidth)$);
Also note that I have used the big blue rectangle as the bounding box.
Full code
\documentclass[b5paper,11pt]{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\newgeometry{top=0pt,bottom=0pt,left=0pt,right=0pt}
\thispagestyle{empty}
\setlength\parindent{0pt}
\begin{tikzpicture}[color=white,line width=.1em,font=\fontsize{90}{90}\selectfont]
\fill[color=blue,use as bounding box] (0,0) rectangle (\paperwidth,\paperheight);
%%\filldraw[color=blue,use as bounding box] (0,0) rectangle ($(\paperwidth,\paperheight)+(-\pgflinewidth,-\pgflinewidth)$);
\draw (.05\paperwidth,0) -- (.05\paperwidth,\paperheight);
\draw (0,.1\paperheight) -- (.05\paperwidth,.1\paperheight);
\draw (0,.3\paperheight) -- (.05\paperwidth,.3\paperheight);
\draw (0,.5\paperheight) -- (.05\paperwidth,.5\paperheight);
\draw (0,.7\paperheight) -- (.05\paperwidth,.7\paperheight);
\draw (0,.9\paperheight) -- (.05\paperwidth,.9\paperheight);
\node[draw,align=center] at (.8\paperwidth,.5\paperheight) {B\\O\\O\\K};
\end{tikzpicture}
\end{document}
A short version:
\documentclass[b5paper,11pt]{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\newgeometry{top=0pt,bottom=0pt,left=0pt,right=0pt}
\thispagestyle{empty}
\setlength\parindent{0pt}
\begin{tikzpicture}[color=white,line width=.1em,font=\fontsize{90}{90}\selectfont]
\filldraw[color=blue,use as bounding box] (0,0) rectangle ($(\paperwidth,\paperheight)+(-\pgflinewidth,-\pgflinewidth)$);
\foreach \x in {0.1,0.3,...,0.9}{
\draw (0,\x\paperheight) -- (.05\paperwidth,\x\paperheight);
}
\draw (.05\paperwidth,0) -- (.05\paperwidth,\paperheight);
\node[draw,align=center] at (.8\paperwidth,.5\paperheight) {B\\O\\O\\K};
\end{tikzpicture}
\end{document}
If you don't want to use calc
library, just use
(\paperwidth-\pgflinewidth,\paperheight-\pgflinewidth)
as noted by Torbjørn T.