我创建了一个文档,需要给每个页面添加边框。我为此编写了代码,但当我运行代码时,PDF 查看器中某些页面的页码未显示。
有人能帮助我吗?
\documentclass[12pt,a4paper]{report}
\usepackage{pgf}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{boxed}
{
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=1,%
}
\pgfpageslogicalpageoptions{1}
{
border code=\pgfsetlinewidth{2pt}\pgfstroke,
border shrink=\pgfpageoptionborder,%
resized width=.90\pgfphysicalwidth,
center=\pgfpoint{.5\pgfphysicalwidth}
{.5\pgfphysicalheight}
}%
}
\begin{document}
This is a document.
\end{document}