Closed Bug 141232 Opened 23 years ago Closed 22 years ago

[FIX]lots of page is white or faint (dark background, light text)

Categories

(Core :: Printing: Output, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: RossBoylan, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file, 1 obsolete file)

When I print this page with v1.0RC1 from Windows all the writing is very faint. When I print it from 0.9.9 on Debian GNU/Linux the first part of the writing is nice and black, but just after the first page, specifically after "and the file .cvsrc should have these 4 lines" it goes white for several pages, showing only "the ouput should be" a few pages later. This is printing to a Lexmark Optra E310, which speaks postscript natively. I've selected grayscale for print options. Here's the start of the page source: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>How to get KDE2 and KDE3 (from cvs) working on the same machine</title> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1"> <link rel="shortcut icon" href="/images/katiesmall.ico"> <link rel="stylesheet" href="http://women.kde.org/kdewomen.css" type="text/css"/> </head> <body bgcolor="#696969" text="#ffffff" > The page does have a "printable page" option I've just noticed, but it seems to me printing should be able to do a better job on this one.
The page uses white text on a dark background... we don't print backgrounds by default, so we darken the text a bit so it's actually visible. If you turn on background printing in Page Setup, the page prints fine and is very readable... So is the request to darken the text _more_ when printing sites that are white-on-dark and background printing is off?
Yes, the text needs to be darker. I'm also curious about the difference between Linux 0.9.9 and Windows RC1. Was there a code change, or is something else going on? I see now that the specification of the desired behavior is non-trivial. Here are some possibilities: * If the background is "sufficiently" dark and background printing is off, ignore all colors (i.e., print stuff black). * dark background and background off -> swap foreground and background colors (or perhaps do some more general inversion of grey scale values). * dark background -> print the background I realize the definition of "sufficiently" dark or white may be a bit tricky, and that the possibility that various colors are deployed for different elements may make a solution hard. But I think a default behavior so that white on black (and near-white on near black) pages print would probably be most useful. Thanks for explaining what was going on (it seems so obvious now!), and for the tip about enabling background printing.
Confirming that we should handle this better... :) No idea on the windows-vs-linux thing.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: lots of page is white or faint → lots of page is white or faint (dark background, light text)
cc: don
How it works. if backgrounds are turned off.. we get the color of the text, turn it into HSV from RGB. We get the value (which is the lightness) and darken it if that value is to light. Then we take that HSV value and turn it back into RBG for the paint. The only thing that is a possibility.. is to darken more, we pretty much are gonna stick the the same hue of the text. The author of the page can put up an alternate printing page using CSS.. or... we could maybee add an option to print all text black.
Assignee: rods → dcone
Target Milestone: --- → Future
*** Bug 142083 has been marked as a duplicate of this bug. ***
*** Bug 143058 has been marked as a duplicate of this bug. ***
I think Mozilla should take a bit of lost knowledge from NS4.. Its Page Setup dialog had checkboxes for the following print options: Beveled Lines Black Text Black Lines Last Page First Print Backgrounds They all make quite a bit of sense. Why not just implement the ones that Mozilla currently lacks? In the meantime, I think I'm going to have to go in and manually alter the source to a few pages I'd like to print.
The text definitely needs to be darkened a good deal more. On a typical black-and-white laser printer, it is basically illegible. There should be a minimum darkness (or a maximum lightness) built into the default printing settings. Furthermore, as a special case, if backgrounds are off, #FFFFFF text should probably be printed as black. This is a very common colour choice, and the obvious intention is usually high contrast. Plus, black goes with all the colours white goes with, so you're not going to screw up the colour scheme.
*** Bug 184140 has been marked as a duplicate of this bug. ***
Attached patch Proposed patch (obsolete) — Splinter Review
Comment on attachment 108617 [details] [diff] [review] Proposed patch dcone, what do you think of that approach? In my testing it seems to give consistenly decent results (readable, hues preserved, etc)
Attachment #108617 - Flags: review?(dcone)
I vote strongly for a "print all text black" option"
You already have that option: * { color: black ! important } in your userContent.css (not to mention printing grayscale instead of color, if this patch lands). Note that my proposed patch will make any gray text (that includes black and white) black if background printing is turned off.
# value = sat; Works nicely (very nicely) where value was greater than sat (e.g., with #647291), but try with colors like #305050; it gets lighter. Maybe that should be more like if (value>sat) { value=sat; } ? Just a thought. Regarding printing all text black: see bug 51848.
Also watch what happens to colors like #330000; or #000033;
Attached patch Add that checkSplinter Review
Good catch. We don't want to lighten anything here. ;)
Attachment #108617 - Attachment is obsolete: true
Attachment #108637 - Flags: review?(dcone)
Attachment #108617 - Flags: review?(dcone)
Seems ok.. I just want to run a few tests then.. if those pass.. I will r it tonight.
Comment on attachment 108637 [details] [diff] [review] Add that check Since dcone is gone, looking for a different reviewer...
Attachment #108637 - Flags: superreview?(roc+moz)
Attachment #108637 - Flags: review?(roc+moz)
Attachment #108637 - Flags: review?(dcone)
I should just take this.
Assignee: dcone → bzbarsky
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Summary: lots of page is white or faint (dark background, light text) → [FIX]lots of page is white or faint (dark background, light text)
Target Milestone: Future → mozilla1.3beta
Comment on attachment 108637 [details] [diff] [review] Add that check r+sr=roc+moz
Attachment #108637 - Flags: superreview?(roc+moz)
Attachment #108637 - Flags: superreview+
Attachment #108637 - Flags: review?(roc+moz)
Attachment #108637 - Flags: review+
fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 177680 has been marked as a duplicate of this bug. ***
*** Bug 165987 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: