# Draw rectangle on absolute coordinates

I want to draw some rectangles on my pages.

For example a rectangle will be drawn

• Start from top 5cm, left 4 cm
• End in 3 cm from right, 2.5 cm from bottom

I tried tikzpicture package, but it draw those rectangles inside the textarea. But I need to draw on absolute coordinates. For example 5cm under the top of the page. Is it possible ? Which packages should I use ?

## 1 Answer

try this

\documentclass[A4paper]{article}
\usepackage{tikz}
\usepackage{geometry}
\usetikzlibrary{positioning,calc}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\draw ($(current page.north west)+(4cm,-5cm)$) rectangle  ($(current page.south east)+(-2.5cm,3cm)$) ;
\end{tikzpicture}
\end{document}


requires two compilations

• Very good solution. Is it possible to add this draw to each page of pdf file ? – Mark May 19 '18 at 20:22
• @Mark Yes, with eso-pic, for instance. – user121799 May 20 '18 at 1:07