[poppler] Branch 'poppler-0.16' - utils/pdftotext.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Apr 26 09:04:30 PDT 2011


 utils/pdftotext.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a7e33358c35506846a9de2461bc90676816fbc50
Author: Tom Gleason <tom at buildadam.com>
Date:   Tue Apr 26 17:06:07 2011 +0100

    bbox coordinates are relative to MediaBox size, not CropBox size

diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index 5676680..a67a9eb 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -341,7 +341,7 @@ int main(int argc, char *argv[]) {
     if (textOut->isOk()) {
       fprintf(f, "<doc>\n");
       for (int page = firstPage; page <= lastPage; ++page) {
-        fprintf(f, "  <page width=\"%f\" height=\"%f\">\n",doc->getPageCropWidth(page), doc->getPageCropHeight(page));
+        fprintf(f, "  <page width=\"%f\" height=\"%f\">\n",doc->getPageMediaWidth(page), doc->getPageMediaHeight(page));
         doc->displayPage(textOut, page, resolution, resolution, 0, gTrue, gFalse, gFalse);
         TextWordList *wordlist = textOut->makeWordList();
         const int word_length = wordlist != NULL ? wordlist->getLength() : 0;


More information about the poppler mailing list