6

I was thinking about giving a finishing touch to my resume by adding a border to the document in black color. I tried using \fancybox but not impressed with the output.

\documentclass[a4paper]{article}

\usepackage[a4paper,vmargin={20mm,20mm},hmargin={20mm,20mm}, includehead,%
 includefoot]{geometry}
 \usepackage{fancybox}

\begin{document}

\fancypage{\setlength{\fboxsep}{0pt}\fbox}{}

Document text goes here...

\end{document}

The output that I am trying to get is something similar like this.

enter image description here

How do I get multiple recessed rectangle covering the whole page ?

Werner
  • 603,163
Shashwat
  • 425

2 Answers2

11

With tikz:

\documentclass[12pt]{scrartcl}
\usepackage{lipsum}
\usepackage[a4paper,margin=1in,heightrounded]{geometry}
%
\usepackage{tikz}
%
\usetikzlibrary{calc}
%
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
    \draw [line width=1pt,rounded corners=7pt,
        ]
        ($ (current page.north west) + (1cm,-1cm) $)
        rectangle
        ($ (current page.south east) + (-1cm,1cm) $);
        \draw [xshift=4mm,dashed,line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (.5cm,-.5cm) $)
        rectangle
        ($ (current page.south east) + (-.5cm,.5cm) $);
    \draw [line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (1.5cm,-1.5cm) $)
        rectangle
        ($ (current page.south east) + (-1.5cm,1.5cm) $);
\end{tikzpicture}
%
\lipsum[1-6]
\end{document}

With background:

\documentclass[12pt]{scrartcl}
\usepackage{xcolor,lipsum}
\usepackage[a4paper,margin=1in,heightrounded]{geometry}
%
\usepackage{background}
%
\usetikzlibrary{calc}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[overlay,remember picture]
    \draw [line width=1pt,rounded corners=7pt,
        ]
        ($ (current page.north west) + (1cm,-1cm) $)
        rectangle
        ($ (current page.south east) + (-1cm,1cm) $);
        \draw [xshift=4mm,dashed,line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (.5cm,-.5cm) $)
        rectangle
        ($ (current page.south east) + (-.5cm,.5cm) $);
    \draw [line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (1.5cm,-1.5cm) $)
        rectangle
        ($ (current page.south east) + (-1.5cm,1.5cm) $);
\end{tikzpicture}
}
%
\begin{document}
\pagestyle{empty}
\lipsum[1-6]
\end{document}

enter image description here

  • That worked, I modified the layout and now I can get the result I wanted, I am using the tikz package and its cool. However the margin/border doesn't extend to second page and stays in the first page itself. How do I make it extended to n number of pages ? – Shashwat Sep 22 '12 at 09:11
  • @Shashwat: Use the background version of the answer. –  Sep 22 '12 at 09:26
3

This is the code that I am using in the resume, pasting the code after \newpage creates line at multiple pages.

\usepackage[a4,frame]{crop}
\usepackage{tikz}
\usetikzlibrary{calc}

%%%
%%%The code below will help us draw borders.
%%%
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
\draw [line width=3pt,rounded corners=1pt,]
    ($ (current page.north west) + (1cm,-1cm) $)
    rectangle
    ($ (current page.south east) + (-1cm,1cm) $);       
\end{tikzpicture}

%%%Till here 
%%%
%%%

Thanks everyone who helped me complete my resume.

enter image description here

Shashwat
  • 425