Dear all, I'm trying to add a signature to a PDF using PDFBOX 2.0.1. During the process, a tmp file (e.g: tmpPDFBoxXXX.pdf) is stored inside the /tmp directory (RehHat server). This file is not deleted after completion. After some checks, it seems that the object responsible of the file creation is "RandomAccessBufferedFileInputStream(InputStream is)". This object is used by the PDFParser object which doesn't close the stream after completion.
The release note 2.0.0 [PDFBOX-2723] seems to handle this bug by adding the following line (see https://issues.apache.org/jira/browse/PDFBOX-2723) in the COSParser : xrefStream.close(); // <--- *** NEW LINE *** But, in debug mode, I saw this line is never reached so the stream is not closed and the tmp file is not deleted. Has anybody a workaround to handle this ? Thanks for your help!