consider using the ByteArrayOutputStream
            implementation from the <a class="external" href="http://commons.apache.org/io/">Jakarta Commons IO project</a> which allocates less memory.
            The full class name is: <span class="codefrag">org.apache.commons.io.output.ByteArrayOutputStream</span>
          
</li>
          
<li>
            In certain cases it can help to write the generated PDF to a temporary file so
            you can quickly reuse the file. This is especially useful, if Int