# Help with making a simple rectangular page border

How do I add a plain rectangle page border offset by 1.5 cm from the edge of the page? I'd prefer to use \TikZ if possible.

• On all pages? Should this boarder be the same as the available text space? – samcarter_is_at_topanswers.xyz Jun 5 '18 at 17:26
• All pages, unrelated to available text space. – KJC Jun 5 '18 at 17:36

\documentclass{article}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\begin{document}
\tikz[overlay,remember picture]\draw($(current page.north east)+(-1.5cm,-1.5cm)$)--($(current page.north west)+(1.5cm,-1.5cm)$)--($(current page.south west)+(1.5cm,1.5cm)$)--($(current page.south east)+(-1.5cm,1.5cm)$)--cycle;
\end{document}


Set the border in all pages:

\documentclass{article}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{fancyhdr}

\newcommand{\myborder}{
\tikz[overlay,remember picture]\draw($(current page.north east)+(-1.5cm,-1.5cm)$)--($(current page.north west)+(1.5cm,-1.5cm)$)--($(current page.south west)+(1.5cm,1.5cm)$)--($(current page.south east)+(-1.5cm,1.5cm)$)--cycle;}

\pagestyle{fancy}
\fancyhf{}
\begin{document}
content
\end{document}

• This is it, thanks! I see how that works but I didn't know the syntax. – KJC Jun 5 '18 at 17:45
• you're welcome :) I'm sure you'll improve this code – Old Nick Jun 5 '18 at 17:46
\documentclass{article}
\usepackage{fancybox}
\cornersize{0}
\fancyput(3.25in,-4.5in){%
\setlength{\unitlength}{1in}\fancyoval(7,9.5)}%
\begin{document}
foo
\end{document}


• I think the OP is asking for something different. – gvgramazio Jun 5 '18 at 17:49

You don't need a hammersledge to obtain this frame on every page: eso-pic and simple \framebox and \raisebox commands with the relevant parameters will do the trick:

\documentclass[11pt,svgnames, a4paper]{book}
\usepackage{eso-pic}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{etoolbox}
\usepackage{lipsum}
\dimdef{\frameheight}{\dimexpr\paperheight-3cm-\fboxsep-2\fboxrule}
\dimdef{\framewidth}{\dimexpr\paperwidth-3cm-2\fboxsep-2\fboxrule}

\title{Page Frames}
\author{My Self}

\date{}
\AtPageLowerLeft{%
\fboxrule = 1pt
\hspace*{1.5cm}\raisebox{1.5cm}{\color{DarkSeaGreen}\framebox[\framewidth]{\rule{0pt}{\frameheight}}}%
}}

\begin{document}

\maketitle
\chapter{Chapter Title}

\lipsum

\end{document}