title: iTextSharp rotated PDF page reverts orientation when file is rasterized at print house
body: <p>Using iTextSharp I am creating a PDF composed of a collection of existing PDFs, some of the included PDFs are landscape orientation and need to be rotated. So, I do the following: </p>
  
  <pre><code>    private static void AdjustRotationIfNeeded(PdfImportedPage pdfImportedPage, PdfReader reader, int documentPage)
      {
          float width = pdfImportedPage.Width;
          float height = pdfImportedPage.Height;
  
          if (pdfImportedPage.Rotation != 0)
          {
              PdfDictionary pageDict = reader.GetPageN(documentPage);
              pageDict.Put(PdfName.ROTATE, new PdfNumber(0));
          }
  
          if (width &gt; height)
          {
              PdfDictionary pageDict = reader.GetPageN(documentPage);
              pageDict.Put(PdfName.ROTATE, new PdfNumber(270));
          }
      }
  </code></pre>
  
  <p>This works great. The included PDFs rotated to portrait orientation if needed. The PDF prints correctly on my local printer.</p>
  
  <p>This file is sent to a fulfillment house, and unfortunately, the landscape included files do not print properly when going through their printer and rasterization process. They use Kodak (Creo) NexRip 11.01 or Kodak (Creo) Prinergy 6.1. machines. The fulfillment house's suggestion is to: "generate a new PDF file after we rotate pages or make any changes to a PDF. It is as easy as exporting out to a PostScript and distilling back to a PDF." </p>
  
  <p>I know iTextSharp doesn't support PostScript. Is there another way iTextSharp can rotate included PDFs to hold the orientation when rasterized?</p>