rebook icon indicating copy to clipboard operation
rebook copied to clipboard

Error in -cbox generated command line

Open R-e-d-J opened this issue 3 years ago • 1 comments

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) :

  • have a space between "-cbox" and the first value
  • not have space between value and the unit

-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 avatar Jul 27 '21 10:07 R-e-d-J

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
        )

R-e-d-J avatar Jul 28 '21 07:07 R-e-d-J