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.
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 owns-return #t)
(caller-
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: document_ new_from_ file document_ new_from_ data document_ get_page (should fix #509408) document_ get_page_ by_label document_ find_dest document_ get_form_ field index_iter_ copy index_iter_ get_action
* poppler_
* poppler_
* poppler_
* poppler_
* poppler_
* poppler_
* poppler_
* poppler_
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.