title: PDFBox render image misses content
body: <p>When using PDFBox, we encounter an issue where if we call <code>render</code> on a PDDocument, it sometimes loses content, such as fonts or certain shapes. </p>
  
  <p>Having dug into this, it looks to be caused by the use of <code>SoftReference</code> throughout the PDFBox code base. The JVM seems to reap the underlying contents of the PDDocument while it's attempting to render the image. As a result, we see <code>org.apache.pdfbox.cos.COSDocument - Warning: You did not close a PDF Document</code> at random intervals. </p>
  
  <p>Has anyone else encountered this issue? If so, how was it solved?
  So far, our solution has been to write the contents to a file, then read and render. </p>