1

I've tried to save PDF file with apache PDFBox but have error

java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?

What's the matter?

PDDocument document = PDDocument.load(new File(fileName));
try {
    ...
    document.save(storeFileName);
} finally {
    document.close();
}
Thomas Fritsch
  • 9,639
  • 33
  • 37
  • 49

0 Answers0