# Draw user defined print margin

How can one draw a box on each page (KOMA class srcreprt) to show a user defined print margin. E.g. the box should be 25 mm from each page margin (which might be different from the actual layout setting which can be shown with \usepackage{showframe})

\documentclass{scrreprt}
\usepackage{blindtext}
\usepackage{showframe}

\begin{document}

\Blinddocument

\end{document}

-
This is related to tex.stackexchange.com/questions/171459/… and the crop package –  Christian Hupfer Apr 15 at 9:00

Try this code:

\documentclass{scrreprt}
\usepackage{blindtext}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}

\usepackage{eso-pic}

\begin{tikzpicture}[remember picture, overlay]
\draw[line width=1pt]
($(current page.north west) +(25mm,-25mm)$)
rectangle
($(current page.south east) +(-25mm,25mm)$);
\end{tikzpicture}%
}
\begin{document}

\Blinddocument

\end{document}


Output:

-

With background:

\documentclass{scrreprt}
\usepackage{blindtext}
\usepackage{background}
\backgroundsetup{
angle=0,
scale=1,
opacity=1,
color=black,
contents={%
\begin{tikzpicture}[remember picture, overlay]
\draw ([xshift=25mm,yshift=25mm]current page.south west) rectangle ([xshift=-25mm,yshift=-25mm)]current page.north east);
\end{tikzpicture}%
}
}

\begin{document}
\Blinddocument

\end{document}


-

After a few modification of the karlkoeller's code I came up with the solution I was looking for:

\documentclass{scrreprt}
\usepackage{blindtext}

\usepackage{tikzpagenodes}
\usetikzlibrary{calc}

\usepackage{eso-pic}

\begin{tikzpicture}[remember picture, overlay]
\draw[line width=1pt]
($(current page.north west) +(25mm,-25mm)$)
rectangle
($(current page.south east) +(-25mm,25mm)$);
\end{tikzpicture}%
}

\begin{document}

\Blinddocument

\end{document}

-
Sorry, I didn't read "from page margin". I've modified my answer. –  karlkoeller Apr 15 at 9:40
@karlkoeller Eh!. I too followed suit. Damn. :) –  Harish Kumar Apr 15 at 9:59