next up previous contents index
Next: Flip Pages Up: Pages Previous: Shift Page Contents   Contents   Index


Rotate Pages

There are two kinds of rotation in PDF documents - a viewing rotation which can be set, making a PDF viewer such as Acrobat Reader open the docment with its pages appearing to be rotated by 90, 180 or 270 degrees, and the actual rotation which is how the text and graphics on a page are layed out (portrait or landscape).

The cpdflib functions Rotate and RotateBy set or alter the viewing rotation, and the function RotateContents alters the actual rotation. The function Upright changes the viewing rotation to 0 and, if necessary counterrotates the actual rotation to compensate. This is useful because many cpdflib functions require upright pages to work as expected.


\begin{framed}
\noindent\textit{Rotate all pages to 90 degrees}
\par
\vspace{2mm...
...ate(pdf, Cpdflib.All(pdf), 90)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}


\begin{framed}
\noindent\textit{Rotate all pages by 90 degrees}
\par
\vspace{2mm...
...eBy(pdf, Cpdflib.All(pdf), 90)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}


\begin{framed}
\noindent\textit{Rotate the contents of all pages by 30 degrees}
...
...s(pdf, Cpdflib.All(pdf), 30.0)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}



root 2008-12-01