title: Unable to set a fixed size for image itextsharp
body: <p>I have been using iTextSharp for creating a report. My report has many images which are of varying sizes. Each image renders in different size eventhough I scale them. I found many solutions but none helped.</p>
  
  <p>My code:</p>
  
  <pre><code>PdfPCell InnerCell;
  iTextSharp.text.Image logo = iTextSharp.text.Image.GetInstance(Server.MapPath(@"images\Logo.png"));
  logo.ScaleToFit(80f, 80f);
  InnerCell.FixedHeight = 80f;
  InnerCell = new PdfPCell(logo); 
  </code></pre>
  
  <p>I tried adding the image to the chunk but the image positions itself to the top. Since being a dynamic report I can't specify the x and y values in chunk</p>
  
  <pre><code>InnerCell = new PdfPCell(new Phrase(new Chunk(logo, 0, 0))); 
  </code></pre>
  
  <p>I even tried <a href="http://fahadzia.com/blog/2010/06/itextsharp-image-resize/" rel="nofollow">this</a> but I can't get a fixed size.</p>