title: How to rotate PDF pages (permanent) to 90, 180, 270 degree c#
body: <p>While rotating the pages should not convert into images that removes searching in the pdf document. </p>
  
  <pre><code>using WebSupergoo.ABCpdf9;
  Doc doc = new Doc();
  byte[] source = // some source of pdf byte array
  doc.Read(source);
  for (int i = 1; i &lt;= doc.PageCount; i++)
  {
       doc.PageNumber = i;
       double w = doc.MediaBox.Width;
       double h = doc.MediaBox.Height;
       double l = doc.MediaBox.Left;
       double b = doc.MediaBox.Bottom;
       doc.Transform.Rotate(90, l, b);
       doc.Transform.Translate(w, 0);
  
       // rotate our rectangle
       doc.Rect.Width = h;
       doc.Rect.Height = w;
  }
  MemoryStream stream = new MemoryStream();
  doc.Save(stream); 
  </code></pre>
  
  <p>The above code seems not to be working. Please suggest appropriately. </p>