Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
This is related to tex.stackexchange.com/questions/171459/… and the crop package –  Christian Hupfer Apr 15 at 9:00

3 Answers 3

Try this code:

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

\usepackage{eso-pic}

\AddToShipoutPicture{%
\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:

enter image description here

share|improve this answer

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}

enter image description here

share|improve this answer

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}

\AddToShipoutPicture{%
\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}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.