32 lines
955 B
Diff
32 lines
955 B
Diff
--- a/poppler/src/rbpoppler-page.c 2010/09/22 14:30:22 3809
|
|
+++ b/poppler/src/rbpoppler-page.c 2010/10/03 12:30:52 3942
|
|
@@ -332,6 +332,9 @@
|
|
}
|
|
|
|
if (NIL_P(rb_rect)) {
|
|
+#if POPPLER_CHECK_VERSION(0, 15, 0)
|
|
+ text = poppler_page_get_text(page);
|
|
+#else
|
|
PopplerRectangle rect;
|
|
double width, height;
|
|
|
|
@@ -343,10 +346,16 @@
|
|
text = poppler_page_get_text(page,
|
|
style,
|
|
&rect);
|
|
+#endif
|
|
} else {
|
|
- text = poppler_page_get_text(page,
|
|
- style,
|
|
- RVAL2POPPLER_RECT(rb_rect));
|
|
+ PopplerRectangle *rect;
|
|
+
|
|
+ rect = RVAL2POPPLER_RECT(rb_rect);
|
|
+#if POPPLER_CHECK_VERSION(0, 15, 0)
|
|
+ text = poppler_page_get_selected_text(page, style, rect);
|
|
+#else
|
|
+ text = poppler_page_get_text(page, style, rect);
|
|
+#endif
|
|
}
|
|
|
|
rb_text = CSTR2RVAL(text);
|