diff options
author | Sebastian Rasmussen <sebras@hotmail.com> | 2010-12-13 23:24:52 +0000 |
---|---|---|
committer | Sebastian Rasmussen <sebras@hotmail.com> | 2010-12-13 23:24:52 +0000 |
commit | 74b88c6c5c3050bfe45fe25e059ba99b2f84588b (patch) | |
tree | d983748cd0cc8d8d14e97064d7bf14b8ab274ee4 /apps | |
parent | 156c683d72bb83cabe8897fa6ae98b4d4270fe9a (diff) | |
download | mupdf-74b88c6c5c3050bfe45fe25e059ba99b2f84588b.tar.xz |
Allow reverse page ranges for pdf tools.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfclean.c | 2 | ||||
-rw-r--r-- | apps/pdfdraw.c | 2 | ||||
-rw-r--r-- | apps/pdfinfo.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c index 0cbeb77e..430e1ac4 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -314,7 +314,7 @@ static void retainpages(int argc, char **argv) dash = strchr(spec, '-'); if (dash == spec) - spage = epage = 1; + spage = epage = pdf_getpagecount(xref); else spage = epage = atoi(spec); diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index e0a6204c..a8c2986c 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -248,7 +248,7 @@ static void drawrange(pdf_xref *xref, char *range) dash = strchr(spec, '-'); if (dash == spec) - spage = epage = 1; + spage = epage = pdf_getpagecount(xref); else spage = epage = atoi(spec); diff --git a/apps/pdfinfo.c b/apps/pdfinfo.c index 4d5e13bb..ddcabecb 100644 --- a/apps/pdfinfo.c +++ b/apps/pdfinfo.c @@ -892,7 +892,7 @@ showinfo(char *filename, int show, char *pagelist) dash = strchr(spec, '-'); if (dash == spec) - spage = epage = 1; + spage = epage = pagecount; else spage = epage = atoi(spec); |