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

New commits:
commit 4b063f84124a13f0561d871e43a08e0cf181ced5
Author: Albert Astals Cid <[email protected]>
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 <[email protected]>
 // Copyright (C) 2009 Shen Liang <[email protected]>
 // Copyright (C) 2009 Stefan Thomas <[email protected]>
-// Copyright (C) 2009, 2010, 2017-2019 Albert Astals Cid <[email protected]>
+// Copyright (C) 2009, 2010, 2017-2020 Albert Astals Cid <[email protected]>
 // Copyright (C) 2010, 2011-2017 Adrian Johnson <[email protected]>
 // Copyright (C) 2010, 2014 Hib Eris <[email protected]>
 // Copyright (C) 2010 Jonathan Liu <[email protected]>
@@ -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 <[email protected]>
 // Copyright (C) 2009 Shen Liang <[email protected]>
 // Copyright (C) 2009 Stefan Thomas <[email protected]>
-// Copyright (C) 2009-2011, 2015, 2018, 2019 Albert Astals Cid <[email protected]>
+// Copyright (C) 2009-2011, 2015, 2018-2020 Albert Astals Cid <[email protected]>
 // Copyright (C) 2010, 2012, 2017 Adrian Johnson <[email protected]>
 // Copyright (C) 2010 Hib Eris <[email protected]>
 // Copyright (C) 2010 Jonathan Liu <[email protected]>
@@ -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);
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to