[poppler] [PATCH] Allow poppler_page_find_text to rerun on same page

Rob Cornish jrmcornish at gmail.com
Mon Mar 18 02:48:28 PDT 2013


Fixed a bug that caused poppler_page_find_text always to start searching
immediately after wherever it had left off in earlier searches. This
behaviour had the effect that the first call to this function would work
properly, but any subsequent calls searching for the same string on the
same page would return NULL.
---
 glib/poppler-page.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index b88c70b..90c5d8d 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -893,7 +893,7 @@ poppler_page_find_text_with_options (PopplerPage     *page,
 
   while (text_dev->findText (ucs4, ucs4_len,
                              gFalse, gTrue, // startAtTop, stopAtBottom
-                             gTrue, gFalse, // startAtLast, stopAtLast
+                             gFalse, gFalse, // startAtLast, stopAtLast
                              options & POPPLER_FIND_CASE_SENSITIVE,
                              backwards,
                              options & POPPLER_FIND_WHOLE_WORDS_ONLY,
-- 
Rob Cornish



More information about the poppler mailing list