If the printer takes the paper long-edge-first and the number-up
option for printing multiple pages per sheet is used, the grid for the
shrinked pages onm the output sheet is set wrongly (number of lines
and number of columns swapped). This commit fixes the this bug.
(manually backported from commit
2477946645ee5511ce88c7e575ecc8334e2be1d3)
return false;
}
- if (param.autoRotate) {
- const bool dst_lscape =
- (param.paper_is_landscape ==
- ((param.orientation == ROT_0) || (param.orientation == ROT_180)));
+ const bool dst_lscape =
+ (param.paper_is_landscape ==
+ ((param.orientation == ROT_0) || (param.orientation == ROT_180)));
+ if (dst_lscape)
+ std::swap(param.nup.nupX, param.nup.nupY);
+
+ if (param.autoRotate)
proc.autoRotateAll(dst_lscape,param.normal_landscape);
- }
std::vector<std::shared_ptr<PDFTOPDF_PageHandle>> pages=proc.get_pages();
const int numOrigPages=pages.size();