GNOME Bugzilla – Bug 604258
hard margins need to take into account page scale
Last modified: 2018-02-10 03:36:18 UTC
Bug 468989 added the ability to obtain the printer hard margins from the print context. This works fine when the page scale is 100%. At other scales the hard margins on the context should be adjusted so that after scaling they match the physical hard margins. For example, with scale = 100%, a print context may return the top,left,right, and bottom hard margins all equal to 0.5". If the scale is set to 50%, the point (0.5", 0.5") will be printed at (0.25", 0.25") which is outside of the printable area. In this case the top and left hard margins on the print context should scaled up to 0.5". The point (paper_width, paper_height) at 100% scale would be outside the printable area but at 50% scale would be inside the printable area. In this case the bottom and right hard margins on the print context should be set to 0.
Created attachment 149512 [details] [review] take page scale into account when setting hard margins on the print context Patch to fix this.
Created attachment 177171 [details] [review] take page scale into account when setting hard margins on the print context Rebasing to git master.
Created attachment 209479 [details] [review] take page scale into account when setting hard margins on the print context Another 12 months has passed. Rebasing to master.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.