Open Bug 1253639 Opened 9 years ago Updated 2 years ago

When printing a selection, the top line is somewhat improperly clipped

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

Tracking Status
firefox46 --- affected
firefox47 --- affected

People

(Reporter: julienw, Unassigned)

References

Details

Attachments

(3 files)

Attached file testcase
STR: 1. Load the attachment in Firefox. 2. Select the first line. (the bug also happens if you select elsewhere) 3. Select the "File" menu, then choose "Print". 4. Select "Print in a file" (note: the bug happens also if you print to a real printer -- but because it reproduces with a file it's better to use this :) ) 5. Select "Selection" in the "what to print" section. 6. Press "Print". 7. Open the generated PDF. => See the text is clipped improperly. As a PDF we can select it to make it appear, but as a real printed page it's obviously impossible. Linux is the only platform where we can choose to print a selection, both Windows and MacOS X don't have this option, that's why I'm filing in Widgets: GTK. This does not seem to happen when the text is shorter. Maybe the full page needs to be too big to fit in one page. I see it happening on bugzilla as well for example.
Attached file result.pdf
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Note I found this bug while using this feature on a real-world website because I needed it, and I needed especially the first line ;)
IIRC, we have multiple bugs filed on this issue already. > Linux is the only platform where we can choose to print a selection, > both Windows and MacOS X don't have this option We support "Print selection only" on all platforms, as far as I know. You may have to look in the "advanced" option to find it though.
Component: Widget: Gtk → Printing: Output
See Also: → 1272349
Summary: When printing a selection on Linux, the top line is somewhat improperly clipped → When printing a selection, the top line is somewhat improperly clipped
With the fix for bug 1272349, this problem is also reproducible on macOS 10.12 on some sites.
(In reply to Haik Aftandilian [:haik] from comment #4) > Created attachment 8905299 [details] > Mac Screenshot showing text with top cut off using "Print Selection Only" > > With the fix for bug 1272349, this problem is also reproducible on macOS > 10.12 on some sites. This cause is maybe "unwriteable margin" preferences. If we use this value to zero, we can prevent this phenomenon. Currently, this value is calculated from default margin value. The nsPrintEngine uses this value in order to calculate selection range, if we choose the 'print selection range'. [1][2] [1] http://searchfox.org/mozilla-central/rev/d08b24e613cac8c9c5a4131452459241010701e0/layout/printing/nsPrintEngine.cpp#2645-2647 [2] http://searchfox.org/mozilla-central/rev/d08b24e613cac8c9c5a4131452459241010701e0/layout/printing/nsPrintEngine.cpp#2684
OS: Linux → All
Hardware: x86_64 → All
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: