Ehm? Why is a patch to poppler needed in any way?
(this is also basically the same as #509408, but that is known ...)

 As far as I can tell the only issue is that poppler-python is missing the
  (caller-owns-return #t)
all over the place in the poppler.defs file. This means that while the python 
object is destroyed, the C Object will stay alive, and keep the file opened. If 
this is added to the different functions, the C object will be destroyed too, 
and the file is closed just fine.

I would say the following functions will at least need the hint:
 * poppler_document_new_from_file
 * poppler_document_new_from_data
 * poppler_document_get_page (should fix #509408)
 * poppler_document_get_page_by_label
 * poppler_document_find_dest
 * poppler_document_get_form_field
 * poppler_index_iter_copy
 * poppler_index_iter_get_action

I have not done any extensive testing, but was able to open, and get the
number of pages of several thousands of PDF files with this changed.

And likely the thumbnail getter too. Not sure how exactly the GList*
handling is done by the binding generator.

-- 
python-poppler doesn't close files
https://bugs.launchpad.net/bugs/316722
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to