title: Java PDF manipulation and rendering
body: <p>I am hoping for this question to become a comprehensive guide to PDF manipulation and rendering in Java. I have a fairly comprehensive implementation by stitching together multiple open source libraries, I would like to improve upon it.</p>
  
  <p><strong>Background</strong></p>
  
  <p>My requirements and current implementation:</p>
  
  <ol>
  <li>Checking existing PDF documents for specific conditions (PDF version, password protection, font embedding, cross reference tables etc.) - Not implemented.</li>
  <li>Allow for the definition of Acroform fields via page co-ordinates or some other mechanism. - Not implemented</li>
  <li>Provide capability to iterate over form fields in a PDF, examine the field type and fill it with data - <a href="http://sourceforge.net/projects/itext/files/iText/" rel="noreferrer">iText v 2.0.8</a></li>
  <li>Render the PDF to an image at different resolutions/DPI - two implementations (pdfrenderer and <a href="http://www.icepdf.org" rel="noreferrer">IcePDF</a>)</li>
  <li>Render HTML/XHTML files to PDF - Flying Saucer xhtmlrenderer </li>
  <li>Do all the above as a <em>library</em> in a Java server environment (implying thread safety)</li>
  </ol>
  
  <p><strong>What do I not like</strong></p>
  
  <p>I am dissatisfied with the following:</p>
  
  <ol>
  <li><strong><em>iText licensing</em></strong>: New versions of iText are under the AGPL license which is a non-starter for my project (and  commercial projects in general?). The fee for the commercial license is non-trivial (spanning usage based pricing of a few cents a document to tens of thousands for site licenses) and if I am going to pay the license fees for the software, I would like to do a full market search for the best product. The 2.x versions of iText work OK, but there are enough bugs in there.</li>
  <li><strong><em>PDF version conformance</em></strong>: There are strange conformance issues when it comes to font embedding, cross reference tables etc. across these libraries to cause a reasonable amount of grief.</li>
  <li><strong><em>Rendering output quality</em></strong>: The quality of rendering to PNG from these files suffers from a few problems in the areas of embedded fonts, images and layers.</li>
  </ol>
  
  <p><strong>What I am hoping for</strong></p>
  
  <p>I am hoping to get some feedback from users and people who have researched PDF libraries. Please include as much of the following information as possible for completeness and posterity.</p>
  
  <ul>
  <li>is your answer/comment based on use or research</li>
  <li>name, version of the library and license (if commercial license, please include cost if possible)</li>
  <li>what do you use the library for</li>
  <li>what do you like about it / what is it good with</li>
  <li>what do you dislike about it / what is it not good with</li>
  <li>what is your overall impression</li>
  </ul>