[poppler] utils/pdftocairo.cc utils/pdftoppm.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 13 09:18:38 UTC 2020


 utils/pdftocairo.cc |    6 +++---
 utils/pdftoppm.cc   |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 4b063f84124a13f0561d871e43a08e0cf181ced5
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Jan 12 23:44:25 2020 +0100

    pdftoppm/pdftocairo: Fix -e/-o printing the wrong pages
    
    Fixes #873

diff --git a/utils/pdftocairo.cc b/utils/pdftocairo.cc
index fe9ceea4..db12a421 100644
--- a/utils/pdftocairo.cc
+++ b/utils/pdftocairo.cc
@@ -18,7 +18,7 @@
 // Copyright (C) 2009 Michael K. Johnson <a1237 at danlj.org>
 // Copyright (C) 2009 Shen Liang <shenzhuxi at gmail.com>
 // Copyright (C) 2009 Stefan Thomas <thomas at eload24.com>
-// Copyright (C) 2009, 2010, 2017-2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2010, 2017-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2010, 2011-2017 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2010, 2014 Hib Eris <hib at hiberis.nl>
 // Copyright (C) 2010 Jonathan Liu <net147 at gmail.com>
@@ -1215,8 +1215,8 @@ int main(int argc, char *argv[]) {
     crop_w = crop_h = sz;
   pg_num_len = numberOfCharacters(doc->getNumPages());
   for (pg = firstPage; pg <= lastPage; ++pg) {
-    if (printOnlyEven && pg % 2 == 0) continue;
-    if (printOnlyOdd && pg % 2 == 1) continue;
+    if (printOnlyEven && pg % 2 == 1) continue;
+    if (printOnlyOdd && pg % 2 == 0) continue;
     if (useCropBox) {
       pg_w = doc->getPageCropWidth(pg);
       pg_h = doc->getPageCropHeight(pg);
diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index 44abd107..fb5a363a 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -18,7 +18,7 @@
 // Copyright (C) 2009 Michael K. Johnson <a1237 at danlj.org>
 // Copyright (C) 2009 Shen Liang <shenzhuxi at gmail.com>
 // Copyright (C) 2009 Stefan Thomas <thomas at eload24.com>
-// Copyright (C) 2009-2011, 2015, 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009-2011, 2015, 2018-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2010, 2012, 2017 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
 // Copyright (C) 2010 Jonathan Liu <net147 at gmail.com>
@@ -578,8 +578,8 @@ int main(int argc, char *argv[]) {
   if (sz != 0) param_w = param_h = sz;
   pg_num_len = numberOfCharacters(doc->getNumPages());
   for (pg = firstPage; pg <= lastPage; ++pg) {
-    if (printOnlyEven && pg % 2 == 0) continue;
-    if (printOnlyOdd && pg % 2 == 1) continue;
+    if (printOnlyEven && pg % 2 == 1) continue;
+    if (printOnlyOdd && pg % 2 == 0) continue;
     if (useCropBox) {
       pg_w = doc->getPageCropWidth(pg);
       pg_h = doc->getPageCropHeight(pg);


More information about the poppler mailing list