pwang7 / rebook

96 stars 11 forks source link

Error in -cbox generated command line #5

Open R-e-d-J opened 3 years ago

R-e-d-J commented 3 years ago

When I'm choosing some margins in "Crop Margins (in)", the generated command line looks like

-mode def -ws 0.200 -wrap+ -rt 0 -evl 1 -ehl 1 -cbox1 in,1 in,6 in,9 in -dev kpw -a- -ui- -x

And it doesn't work. The generated command line should (I think) :

-mode def -ws 0.200 -wrap+ -rt 0 -evl 1 -ehl 1 -cbox 1in,1in,6in,9in -dev kpw -a- -ui- -x

R-e-d-J commented 3 years ago

I found a solution (of a workaround… without extensive test, I'm not sure). If you add a "+" on the second line of arg = (), the generated command line is correct :

        arg = (
            # no space between -cbox and page range
            crop_margin_arg_name + page_range_arg + ' '
            + 'in,'.join(map(str.strip, margin_args)) + 'in'     #     adding the "+" at the beginning of the line
        )