Public bug reported: Release: 12.04 cups-filters: 1.0.18-0ubuntu0.1
When PDF of landscape is printed by "lpr test.pdf", it is printed with portrait. pdftopdf rotates 90 degrees automatically, when PDF is landscape. However, a judgment is too severe. It does not rotate, when PDF is larger than a paper. There is an error in the size of PDF. A4 is defined by 595x842 at ppd of CUPS. It will rotate, if the size of PDF is 842x595. However, the size of PDF may be 841.89 x 595.276 pts (A4). In this case, it does not rotate. I want to rotate if the size difference is less than 1point. --- P2PPage.cxx.bak 2012-11-18 05:39:25.059384813 +0900 +++ P2PPage.cxx 2012-11-18 05:46:02.086929669 +0900 @@ -585,8 +585,8 @@ double pageHeight = mediaBox.y2 - mediaBox.y1; if (pageHeight < 0) pageHeight = -pageHeight; - if ((mediaWidth >= pageWidth && mediaHeight >= pageHeight) - || (mediaWidth < pageHeight || mediaHeight < pageWidth)) { + if (((mediaWidth+1) >= pageWidth && (mediaHeight+1) >= pageHeight) + || ((mediaWidth+1) < pageHeight || (mediaHeight+1) < pageWidth)) { /* the page is inside the media or rotated page is not inside */ return; } ** Affects: cups-filters (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1080232 Title: The autorotate by pdftopdf severe a size judging of paper. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/1080232/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs