1
0
Fork 0
forked from josch/img2pdf

read and write in binary

This commit is contained in:
josch 2012-06-15 17:13:32 +02:00
parent 1302315bed
commit 1b609fc77d

View file

@ -201,9 +201,9 @@ def main(images, dpi, title=None, author=None, creator=None, producer=None,
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='lossless conversion/embedding of images (in)to pdf') parser = argparse.ArgumentParser(description='lossless conversion/embedding of images (in)to pdf')
parser.add_argument('images', metavar='infile', type=argparse.FileType('r'), parser.add_argument('images', metavar='infile', type=argparse.FileType('rb'),
nargs='+', help='input file(s)') nargs='+', help='input file(s)')
parser.add_argument('-o', '--output', metavar='out', type=argparse.FileType('w'), parser.add_argument('-o', '--output', metavar='out', type=argparse.FileType('wb'),
default=sys.stdout, help='output file (default: stdout)') default=sys.stdout, help='output file (default: stdout)')
def positive_float(string): def positive_float(string):
value = float(string) value = float(string)