diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfclean.c | 10 | ||||
-rw-r--r-- | apps/pdfdraw.c | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c index f3e57ed5..f3f1e202 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -210,8 +210,10 @@ static void removeduplicateobjs(void) { fz_obj *a, *b; - /* pdf_isstream() calls pdf_cacheobject() and thus - ensures that the objects are in xref afterwards. */ + /* + pdf_isstream calls pdf_cacheobject and ensures + that the xref table has the objects loaded + */ if (num == other || pdf_isstream(xref, num, 0) || pdf_isstream(xref, other, 0)) @@ -271,9 +273,7 @@ static void retainpages(int argc, char **argv) fz_dropobj(pages); fz_dropobj(type); - /* Create a new kids array too add into pages dict - * since each element must be replaced to point to - * a retained page */ + /* Create a new kids array with only the pages we want to keep. */ kids = fz_newarray(1); count = 0; diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index e0003246..cf2a2d45 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -287,6 +287,12 @@ int main(int argc, char **argv) if (fz_optind == argc) usage(); + if (!showtext && !showxml && !showtime && !showmd5 && !output) + { + printf("nothing to do\n"); + exit(0); + } + if (accelerate) fz_accelerate(); |