fix parsing of dpi and % units
This commit is contained in:
parent
917c173bfd
commit
7160f1628d
1 changed files with 8 additions and 2 deletions
|
@ -929,6 +929,12 @@ def parse_imgsize_num(num, name):
|
|||
raise argparse.ArgumentTypeError(msg)
|
||||
if unit is None:
|
||||
unit = ImgUnit.pt
|
||||
else:
|
||||
# strip off unit from string
|
||||
if unit == ImgUnit.dpi:
|
||||
num = num[:-3]
|
||||
elif unit == ImgUnit.perc:
|
||||
num = num[:-1]
|
||||
else:
|
||||
num = num[:-2]
|
||||
try:
|
||||
|
@ -1396,7 +1402,7 @@ values set via the --border option.
|
|||
'--creator', metavar='creator', type=str,
|
||||
help='Sets the creator metadata value')
|
||||
metaargs.add_argument(
|
||||
'--producer', metavar='producer', type=str, default="img2pdf"
|
||||
'--producer', metavar='producer', type=str, default="img2pdf",
|
||||
help='Sets the producer metadata value (default is: img2pdf)')
|
||||
metaargs.add_argument(
|
||||
'--creationdate', metavar='creationdate', type=valid_date,
|
||||
|
|
Loading…
Reference in a new issue