Print: Selection of page size using document page size does not work
Submitted by y
I regularly print PDF in different sizes. Sometimes all Letter, sometimes all Legal, sometimes a mix of both page sizes in a single PDF.
I also have a printer with two trays for those two paper sizes, and I wish there was an option for evince to select the appropriate paper size / tray for each individual page being printed, much like Adobe Reader does (sorry for the comparison).
I thought the checkbox "Select page size using document page size" in the Page Handling tab of the Print dialog would do that, but it seems that it does not. Whether it is checked or not, the printer prints to the same tray, not to the tray with the page size matching the document page size.
I would expect evince to determine for each available tray and for each page to be printed which one is the better fit, based on a simple formula, such as selecting the tray that results in a value closer to zero for the following formula: (1-tH/dH)(1-pW/dW)(1-tAR/dAR) where tH/tW/tAR are the height, width, and aspect ratio of the sheet in the tray and dH/dW/dAR are the height, width, and aspect ratio of the page in the document.
Currently, all pages in the PDF are printed to the pre-selected paper tray, applying the same scaling and/or cropping that were applied to the previous PDF and stored in ~/.config/evince/print-settings. If I forget that I have printed a Legal sized PDF and print a Letter sized PDF with the previous settings, I end up with a waste of paper and toner. The logic to chose the better matching tray on a page by page basis will solve this problem as well.