title: ItextSharp Scaling / Resizing Images into PDF
body: <p>I am using Itextsharp to put some images into PDF. Some of these images are large (3600h by 2500w) and some bit small (1000h by 700w). My PDF page is 842H by 737H.</p>
  
  <p>Some of these large images will not fit into potrait so i am flipping images where the width > height.</p>
  
  <pre><code> img.RotationDegrees = 90f; 
  </code></pre>
  
  <p><strong>Now my problem is how do i scale the images so they all scale and fit into the page perfectly?</strong> </p>
  
  <p>I tried using </p>
  
  <pre><code> var scalePercent=  (PDFPage.Width / img.Width) * 100;
  
   img.ScalePercent(scalePercent);
  </code></pre>
  
  <p>but this didnt work for most images, specially small images.</p>