[poppler] 'unloading' using pypoppler:
David De Weerdt
david.deweerdt at gmail.com
Wed Jun 6 15:36:24 PDT 2012
Hi,
I'm using pypoppler and am wondering how to properly release a pdf file.
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.
<code>
import sys, QtPoppler, time
if __name__ == "__main__":
d = QtPoppler.Poppler.Document.load("file1.pdf")
del d
d = QtPoppler.Poppler.Document.load("file2.pdf")
time.sleep(100000)
</code>
Thank you,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120607/438bc777/attachment.htm>
More information about the poppler
mailing list