Article ID: 184193
Article Last Modified on 10/6/2003
Top: 1"
Bottom: 1"
Left: 1.25"
Right 1.25"
Header: 0.5"
Footer: 0.5"
{PRINT \p page \* MERGEFORMAT}
{ PRINT \p page "% Rotate Landscape Page Numbers
% This is set to mimic footer page numbers that are flush right, 12-
% point Times-Roman.
% The document margins should be Top and Bottom 1" left, right 1.25".
0 0 moveto
/Times-Roman findfont 12 scalefont setfont
/StrLength {(Page ) stringwidth pop wp$fpage stringwidth pop add} def
% To move the position of the text, modify the following settings.
% If you need to move the text to the right increase the number in
% PoinstFromTop.
/PointsFromRight {6} def
/PointsFromTop {120} def
/PointsFromBottom {42} def
/UpperMiddle {wp$x PointsFromTop sub wp$y 2 div StrLength 2 div add} def
/UpperRight {wp$x PointsFromTop sub wp$yorig PointsFromRight add
StrLength
add} def
/BottomMiddle {wp$xorig PointsFromBottom add wp$y 2 div StrLength 2 div
add} def
/BottomRight {wp$xorig PointsFromBottom add wp$yorig PointsFromRight add
StrLength add} def
% NOTE: You can use any one of the following four lines. To change the
% position of the page number, place a percent sign in front of the
% "UpperRight moveto" line, and remove the percent sign from the line
% that contains the position you want the page number to be in.
%UpperMiddle moveto
UpperRight moveto
%BottomMiddle moveto
%BottomRight moveto
0 rotate
(Page ) show
wp$fpage show "}
/Times-Roman findfont 12 scalefont setfont
Sets the font and font size.
/PointsFromRight {36} def
Sets the distance in points from the right edge of the paper to the
baseline and starting edge of the first character in the page number.
This measurement applies to page numbers that appear at the upper
right or bottom right in portrait position.
/PointsFromTop {36} def
Sets the distance in points from the top edge of the paper to the
page number. This measurement applies to page numbers that appear at
the upper right or upper middle in portrait position.
/PointsFromBottom {36} def
Sets the distance in points from the bottom edge of the paper to the
page number. This measurement applies to page numbers that appear at
the bottom right or bottom middle in portrait position.
/StrLength { (Page )...
(Page ) show
Specifies the characters that will precede the page number. If you
don't want any characters to precede the page number, delete all
characters within parentheses in both lines of code shown.
180097 WD98: How to Print a Page a Page Number Sideways
Keywords: kbhowto kbprint kbfield kblayout KB184193