title: java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?
body: <p>I've tried to save PDF file with apache PDFBox but have error</p>
  
  <blockquote>
    <p>java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?</p>
  </blockquote>
  
  <p>What's the matter?</p>
  
  <pre><code>PDDocument document = PDDocument.load(new File(fileName));
  try {
      ...
      document.save(storeFileName);
  } finally {
      document.close();
  }
  </code></pre>