# Using a picture as the page border for an entire document

I've got a LaTeX document, and I've been given a PNG file consisting of a page border with a big transparent section in the middle.

Is it possible to use LaTeX to add that image to every page, with the actual content in the transparent section; or will I have to create the PDF with LaTeX and then manually add the border in some other way?

-

One option would be to use the background package to place the image as a background image; the geometry package can be used to adjust the text area. A little example:

\documentclass{article}
\usepackage[tmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm,bmargin=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{background}
\usepackage{fourier}
\usepackage{lipsum}

\backgroundsetup{scale=1,angle=0,opacity=1,contents={\includegraphics[scale=1]{border}}}

\begin{document}
\lipsum[1-20]
\end{document}


An image of the first page of the resulting document:

Here's the code I used toproduce the border used:

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage[object=vectorian]{pgfornament}
\usetikzlibrary{calc}

\definecolor{mycolor}{cmyk}{0,0,0.1,0}

\pagestyle{empty}
\begin{document}
\color{mycolor}
\begin{tikzpicture}[remember picture,overlay]
\coordinate (a) at ( $(current page.north west) + (1cm,-1cm)$);
\coordinate (b) at ( $(current page.south west) + (1cm,1cm)$);
\coordinate (c) at ( $(current page.south east) + (-1cm,1cm)$);
\coordinate (d) at ( $(current page.north east) + (-1cm,-1cm)$);
\fill[Maroon] (current page.south west) rectangle ( $(current page.north west) + (2cm,0)$);
\fill[Maroon] (current page.south east) rectangle ( $(current page.north east) + (-2cm,0)$);
\fill[Maroon] (current page.north west) rectangle ( $(current page.north east) + (0,-2cm)$);
\fill[Maroon] (current page.south west) rectangle ( $(current page.south east) + (0,2cm)$);
\pgfornamenthline{a}{d}{north}{87}
\pgfornamenthline{b}{c}{south}{87}
\pgfornamentvline{a}{b}{west}{87}
\pgfornamentvline{c}{d}{east}{87}
\end{tikzpicture}
\end{document}

-