Hi,<div><br></div><div>I'm using pypoppler and am wondering how to properly release a pdf file.</div><div><br></div><div>In particular, I would have hoped that the following python code would be 'hanging' (in the loop) with only file2.pdf open, as file1 has been del'ed. However, an lsof shows that file1.pdf is still open. How can/should I properly close the file1.pdf? In my application it causes problems because after loading a few hundred pdfs, I start getting "Too many open files" errors.</div>
<div><br></div><div><div><code></div><div><br></div><div>import sys, QtPoppler, time</div><div>if __name__ == "__main__":</div><div> d = QtPoppler.Poppler.Document.load("file1.pdf")</div><div>
del d</div><div> d = QtPoppler.Poppler.Document.load("file2.pdf")</div><div> time.sleep(100000)</div></div><div><br></div><div></code></div><div><br></div><div>Thank you,</div><div>David</div>