Lines 3-9
Link Here
|
3 |
* |
3 |
* |
4 |
* Common text filter routines for the Common UNIX Printing System (CUPS). |
4 |
* Common text filter routines for the Common UNIX Printing System (CUPS). |
5 |
* |
5 |
* |
6 |
* Copyright 2007 by Apple Inc. |
6 |
* Copyright 2007-2008 by Apple Inc. |
7 |
* Copyright 1997-2007 by Easy Software Products. |
7 |
* Copyright 1997-2007 by Easy Software Products. |
8 |
* |
8 |
* |
9 |
* These coded instructions, statements, and computer programs are the |
9 |
* These coded instructions, statements, and computer programs are the |
Lines 605-618
TextMain(const char *name, /* I - Name o
Link Here
|
605 |
!strcasecmp(val, "yes"); |
605 |
!strcasecmp(val, "yes"); |
606 |
|
606 |
|
607 |
if ((val = cupsGetOption("columns", num_options, options)) != NULL) |
607 |
if ((val = cupsGetOption("columns", num_options, options)) != NULL) |
|
|
608 |
{ |
608 |
PageColumns = atoi(val); |
609 |
PageColumns = atoi(val); |
609 |
|
610 |
|
|
|
611 |
if (PageColumns < 1) |
612 |
{ |
613 |
_cupsLangPrintf(stderr, _("ERROR: Bad columns value %d!\n"), PageColumns); |
614 |
return (1); |
615 |
} |
616 |
} |
617 |
|
610 |
if ((val = cupsGetOption("cpi", num_options, options)) != NULL) |
618 |
if ((val = cupsGetOption("cpi", num_options, options)) != NULL) |
|
|
619 |
{ |
611 |
CharsPerInch = atof(val); |
620 |
CharsPerInch = atof(val); |
612 |
|
621 |
|
|
|
622 |
if (CharsPerInch <= 0.0) |
623 |
{ |
624 |
_cupsLangPrintf(stderr, _("ERROR: Bad cpi value %f!\n"), CharsPerInch); |
625 |
return (1); |
626 |
} |
627 |
} |
628 |
|
613 |
if ((val = cupsGetOption("lpi", num_options, options)) != NULL) |
629 |
if ((val = cupsGetOption("lpi", num_options, options)) != NULL) |
|
|
630 |
{ |
614 |
LinesPerInch = atof(val); |
631 |
LinesPerInch = atof(val); |
615 |
|
632 |
|
|
|
633 |
if (LinesPerInch <= 0.0) |
634 |
{ |
635 |
_cupsLangPrintf(stderr, _("ERROR: Bad lpi value %f!\n"), LinesPerInch); |
636 |
return (1); |
637 |
} |
638 |
} |
639 |
|
616 |
if (PrettyPrint) |
640 |
if (PrettyPrint) |
617 |
PageTop -= 216.0f / LinesPerInch; |
641 |
PageTop -= 216.0f / LinesPerInch; |
618 |
|
642 |
|