From 7df29a9acc92802fae03ad9d28d427ae5e67d72b Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 20 Jan 2017 09:15:02 +0100 Subject: [PATCH] Allow to call get_layout_fun with less parameters by specifying defaults --- src/img2pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 20fe784..1267028 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -759,7 +759,7 @@ def in_to_pt(length): return 72*length -def get_layout_fun(pagesize, imgsize, border, fit, auto_orient): +def get_layout_fun(pagesize=None, imgsize=None, border=None, fit=None, auto_orient=False): def fitfun(fit, imgwidth, imgheight, fitwidth, fitheight): if fitwidth is None and fitheight is None: raise ValueError("fitwidth and fitheight cannot both be None")