pdfstitcher icon indicating copy to clipboard operation
pdfstitcher copied to clipboard

Error when joining A4 pages in mode "first columns, then rows"

Open lucielavickova opened this issue 2 years ago • 2 comments

When trying to join A4 pages and selecting the option "first columns, then rows", I get an error "ValueError: max() arg is an empty sequence" when I change to "first rows, then columns", this error does not occur.

image

Sewing pattern: https://cdn.shopify.com/s/files/1/0606/4737/5098/files/Made_for_Motti_-_Hose_Motti.pdf?v=1634755509

lucielavickova avatar May 13 '22 17:05 lucielavickova

This is an interesting one, with 19 pages and 6 columns, PDFStitcher calculates that 4 rows are required (rounding up 19 / 6). However, if you fill the columns first, then you get an empty column at the end, which is where the empty sequence came from:

Rows first:

1 2 3 4 5 6
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19

Columns first:

1 2 3 4 5 6
1 5 9 13 17
2 6 10 14 18
3 7 11 15 19
4 8 12 16

What behaviour would you expect in this situation? The options that I can think of are either:

  1. Notify the user that the selected arrangement does not work
  2. Drop down to 5 columns (and also probably notify the user)

cfcurtis avatar May 13 '22 19:05 cfcurtis

aaaah, by bad, I confused rows and columns when selecting the 6.... In that case, my preferred option would be the first suggested solution - notify, that the arrangement does not work. Thank you very much!

lucielavickova avatar May 13 '22 20:05 lucielavickova