Package: gpdftext
Version: 0.1.4-1
Severity: important
Tags: patch
User: toscano.p...@tiscali.it
Usertags: poppler-0.16

Hi Neil,

the current package of gpdftext ftbfs with poppler 0.16.3 from
experimental [1].

It is basically a typo: the configure check uses HAVE_POPPLER_1_4_1 vs
HAVE_POPPLER_0_14_1 in the source code.

As poppler provides a handy version check macro POPPLER_CHECK_VERSION
you can actually get rid of the configure check altogether.

The attached patch uses this macro.

As we would like to start the poppler transition soon we would
appreciate if you could upload a fixed package soon, as this will make
it easier because the package is then binNMUable.

@ Pino: [2] says that y cords don't need to be inverted
for poppler_page_get_selected_text(). So I'm wondering if the existing
code is actually correct in this regard, i.e. can we simply pass
queue->rect to both poppler_page_get_selected_text() and
poppler_page_get_text() or do we need to handle that differently?
I'd appreciate your review, Pino.

Cheers,
Michael

[1] http://www.teco.edu/~biebl/log-poppler-0.16/gpdftext.log
[2]
http://cgit.freedesktop.org/poppler/poppler/commit/?id=b257428150e2c13dcc24fd8f75e4ee2c679ab414
-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.39-1-486
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Index: gpdftext-0.1.4/src/pdf.c
===================================================================
--- gpdftext-0.1.4.orig/src/pdf.c	2011-05-23 08:47:44.330188694 +0200
+++ gpdftext-0.1.4/src/pdf.c	2011-05-23 08:51:45.779153271 +0200
@@ -407,10 +407,10 @@
 	poppler_page_get_size (PDFPage, &width, &height);
 	queue->rect->x2 = width;
 	queue->rect->y2 = height;
-#ifdef HAVE_POPPLER_1_4_1
+#if POPPLER_CHECK_VERSION(0, 15, 1)
 	page = poppler_page_get_selected_text (PDFPage, POPPLER_SELECTION_LINE, queue->rect);
 #else
-    page = poppler_page_get_text (PDFPage, POPPLER_SELECTION_LINE, queue->rect);
+	page = poppler_page_get_text (PDFPage, POPPLER_SELECTION_LINE, queue->rect);
 #endif
 	set_text (queue->ebook, page, queue->lines, queue->pagenums, queue->hyphens);
 	g_free (page);

Reply via email to