title: Fixing image positioning in iTextSharp
body: <p>How can I step through elements in an itextsharp document and alter them after they have been created? Specifically I'd like to find image elements in my document and change the image alignment attribute.</p>
  
  <hr>
  
  <p>Here is the scenario to head off the inevitable why the hell are you trying to do this posts -</p>
  
  <p>I have an application with some extremely complex dynamic contracts. I wrote a class that allows the contract to be defined in xml with variables, conditional blocks, loops, and "functions" to make defining the contract logic easier. My code transforms the dynamic elements into an xml document that can be parsed by the itextsharp xmlparser.</p>
  
  <p>It works well except for checkboxes. It looks like the built in fonts don't contain a check box glyph, and as far as I can tell the only way to make them appear is to include them as images. This works but I have very limited control of the display properties, setting the alignment in xml does nothing - it always displays with the text breaking to the next line. </p>
  
  <p>The only thing I can think of to fix the problem is to go through the document after it is created and retroactively fix the image alignment from code where I have more control. Any Ideas?</p>