How do I rotate all pages in a PDF?

Q: How do I rotate all pages in a PDF using PDFTron?

I have a PDF that is 8.5x11 and I want to rotate all pages 90 degrees
to 11x8.5.
------------------

A: You can use page.SetRotation(). For example:

....
for (PageIterator itr = doc.GetPageIterator(); itr.HasNext();
itr.Next())
   itr.Current().SetRotation(Page.Rotate.e_90);

doc.Save("rotated.pdf", 0);