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.
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(doc);