I am trying to create sheets of labels using pgfpages
but, apparently, I'm doing it wrong. Here is what I have tried:
\documentclass{article}
\usepackage[paperwidth=2in,paperheight=2in,nohead,nofoot]{geometry}
\pagestyle{empty}
\usepackage{pgf}
\usepackage{pgfpages}
% Layout from http://www.onlinelabels.com/OL3016.htm
\pgfpagesdeclarelayout{OL3016}
{
\edef\pgfpageoptionheight{\the\paperheight}%
\edef\pgfpageoptionwidth{\the\paperwidth}%
\edef\pgfpageoptionborder{0pt}%
\edef\labelheight{2in}%
\edef\labelwidth{2in}%
\edef\labelmargin{0.25in}%
\edef\labelxsep{1in}%
\edef\labelysep{0.8333in}%
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=12,%
last logical shipout=12,
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
current logical shipout=1,%
}
%
\pgfpageslogicalpageoptions{1}
{%
%copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{1.25in}{1.25in}%
}%
\pgfpageslogicalpageoptions{2}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{4.25in}{1.25in}%
}%
\pgfpageslogicalpageoptions{3}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{7.25in}{1.25in}%
}%
%
\pgfpageslogicalpageoptions{4}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{1.25in}{3.25in+\labelysep}%
}%
\pgfpageslogicalpageoptions{5}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{1.25in+3in}{3.25in+\labelysep}%
}%
\pgfpageslogicalpageoptions{6}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{7.25in}{3.25in+\labelysep}%
}%
%
\pgfpageslogicalpageoptions{7}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{1.25in}{5.25in+2*\labelysep}%
}%
\pgfpageslogicalpageoptions{8}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{4.25in}{5.25in+2*\labelysep}%
}%
\pgfpageslogicalpageoptions{9}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{7.25in}{5.25in+2*\labelysep}%
}%
%
\pgfpageslogicalpageoptions{10}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{1.25in}{7.25in+3*\labelysep}%
}%
\pgfpageslogicalpageoptions{11}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{4.25in}{7.25in+3*\labelysep}%
}%
\pgfpageslogicalpageoptions{12}
{%
copy from=1,%
border code=\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=\labelwidth,%
resized height=\labelheight,%
center=\pgfpoint{7.25in}{7.25in+3*\labelysep}%
}%
}
\pgfpagesuselayout{OL3016}[letterpaper]
\begin{document}
This is my label 1.\clearpage
This is my label 2.\clearpage
This is my label 3.\clearpage
This is my label 4.\clearpage
This is my label 5.\clearpage
This is my label 6.\clearpage
This is my label 7.\clearpage
This is my label 8.\clearpage
This is my label 9.\clearpage
This is my label 10.\clearpage
This is my label 11.\clearpage
This is my label 12.\clearpage
This is my label 13.\clearpage
\end{document}
I was expection to have one sheet with 12 copies of the same label (because of the copy from
option). What I am getting is the first physical page with label 1 -- 12 and the next with label 13 and eleven label 1.
Can pgfpages
be used to declare a layout with 12 copies of the same logical page on each physical page?
labels
package?pgfpages
solution would allow me to make a small package declaring the layouts for each of the label sheets that I am using. Stating\pgfpagesuselayout{OL3016}
in the preamble of any document would then rearrange it for printing on OL3016 labels. No special markup would be needed in the document.