]> mj.ucw.cz Git - paperjam.git/blobdiff - paperjam.cc
TODO: a4r paper
[paperjam.git] / paperjam.cc
index 3af52ab9dfb17316c512cb1a9ad320ad5bda5f21..0d3bf12c57fe95452fcd8cb1ec5b626966ce2f6d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     PaperJam -- Main program
  *
- *     (c) 2018 Martin Mares <mj@ucw.cz>
+ *     (c) 2018--2022 Martin Mares <mj@ucw.cz>
  */
 
 #include <cassert>
@@ -17,6 +17,7 @@
 const char *in_name;
 const char *out_name;
 bool recalc_bbox;
+bool no_auto_transforms;
 int debug_level;
 int debug_indent;
 
@@ -69,6 +70,7 @@ void err(const char *msg, ...)
 enum opt {
   OPT_HELP = 256,
   OPT_VERSION,
+  OPT_NO_AUTO,
 };
 
 static const struct option long_opts[] = {
@@ -88,11 +90,15 @@ static void usage()
 Options:\n\
 -b, --bbox             Recalculate bounding boxes\n\
 -d, --debug            Show debugging messages\n\
+    --no-auto          Disable automatic rotation of pages\n\
 \n\
 <command> = <name>(<args>, <named-arg>[=<value>], ...) [<pipeline>]\n\
 <pipeline> = { <stage>, <stage>, ... }\n\
 <stage> = <page> <page> ... [: <commands>]\n\
 \n\
+Example:\n\
+paperjam 'book nup(2, paper=a4)' input.pdf output.pdf\n\
+\n\
 Commands:\n\
 ");
   parser_help();
@@ -123,6 +129,9 @@ int main(int argc, char **argv)
       case OPT_HELP:
        usage();
        return 0;
+      case OPT_NO_AUTO:
+       no_auto_transforms = true;
+       break;
       default:
        exit(1);
       }