Previously, if the number of input pages was not a square number, only
the next smaller square number of pages were contained in the default
output.
my $usage = <<ENDUSAGE;
-pdfstitch - Copyright (C) 2017 by Jakob Haufe <sur5r\@sur5r.net>
+pdfstitch - Copyright (C) 2017-2022 by Jakob Haufe <sur5r\@sur5r.net>
Usage: $0 [-hgpcs] [--genmeta] [--defaultcrop=<factor>] [--preview] [--crop] [--stitch] {PDF file|.stitch file}
width => ($urx - $llx)*$defaultcrop,
height => ($ury - $lly)*$defaultcrop,
columns => int(sqrt($pdf->pages)),
- rows => int(sqrt($pdf->pages)),
+ rows => POSIX::ceil($pdf->pages/int(sqrt($pdf->pages))),
pageorder => [(1 .. $pdf->pages)],
};