diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2013-12-20 07:19:21 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2014-02-05 19:42:50 +1030 |
commit | 7ac7d3bad4b868950ee96fd9c5ece88632f8827c (patch) | |
tree | f6f9b013806dc2c5b2dc1079bfb84192cfab36c3 /utils/pdftops.cc | |
parent | 31fc5181bc491ff2e4aee0ae05c0f611a36e585c (diff) |
pdftops: Remove origpagesizes mode and make -origpagesizes an alias for -paper match
Bug 72312
Diffstat (limited to 'utils/pdftops.cc')
-rw-r--r-- | utils/pdftops.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/utils/pdftops.cc b/utils/pdftops.cc index b54fd425..e003baac 100644 --- a/utils/pdftops.cc +++ b/utils/pdftops.cc @@ -81,7 +81,7 @@ static GBool level2 = gFalse; static GBool level2Sep = gFalse; static GBool level3 = gFalse; static GBool level3Sep = gFalse; -static GBool doOrigPageSizes = gFalse; +static GBool origPageSizes = gFalse; static GBool doEPS = gFalse; static GBool doForm = gFalse; #if OPI_SUPPORT @@ -129,7 +129,7 @@ static const ArgDesc argDesc[] = { "generate Level 3 PostScript"}, {"-level3sep", argFlag, &level3Sep, 0, "generate Level 3 separable PostScript"}, - {"-origpagesizes",argFlag, &doOrigPageSizes,0, + {"-origpagesizes",argFlag, &origPageSizes,0, "conserve original page sizes"}, {"-eps", argFlag, &doEPS, 0, "generate Encapsulated PostScript (EPS)"}, @@ -231,10 +231,9 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Error: use only one of the 'level' options.\n"); exit(1); } - if ((doOrigPageSizes ? 1 : 0) + - (doEPS ? 1 : 0) + + if ((doEPS ? 1 : 0) + (doForm ? 1 : 0) > 1) { - fprintf(stderr, "Error: use only one of -origpagesizes, -eps, and -form\n"); + fprintf(stderr, "Error: use only one of -eps, and -form\n"); exit(1); } if (level1) { @@ -254,15 +253,21 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Error: forms are only available with Level 2 output.\n"); exit(1); } - mode = doOrigPageSizes ? psModePSOrigPageSizes - : doEPS ? psModeEPS - : doForm ? psModeForm - : psModePS; + mode = doEPS ? psModeEPS + : doForm ? psModeForm + : psModePS; fileName = new GooString(argv[1]); // read config file globalParams = new GlobalParams(); + if (origPageSizes) { + paperWidth = paperHeight = -1; + } if (paperSize[0]) { + if (origPageSizes) { + fprintf(stderr, "Error: -origpagesizes and -paper may not be used together.\n"); + exit(1); + } if (!setPSPaperSize(paperSize, paperWidth, paperHeight)) { fprintf(stderr, "Invalid paper size\n"); delete fileName; |