font colors change when printing

非 Y 不嫁゛ 提交于 2019-12-23 19:31:45

问题


I have a really perplexing issue here. I have a table that is built dynamically (probably an unimportant fact here, but just so you know). On the webpage, I have text being set as particular colors based on logic criteria. On the page, it looks great. When going to print preview (and actually printing), the colors are very different.

In my code, the colors are: Red - FF0000 Orange - FF8300 Yellow - FFFF00

The image below shows the page and then the printing colors on the left and right, respectively. Note that I don't care about the background color. You can clearly tell that the colors are far more distinct on the page then they are in print preview.. and the yellow isnt even yellow at all.

Any thoughts about why this is happening??


回答1:


You need to enable "Print Background Colors and Images".

This, for some reason, also fixes the foreground colors. When unchecked the print is in economics mode.


      


Before and after shots:

Web Render:

Print Before:

Print After:


Sample page used:

<table border=1>
   ...

With CSS:

th {
    font-family: Arial;
    color:#244169;
    background:#d8ebf9;
}
td {
    font: bold 10pt Courier;
    background: #f1f5f8;    
}

.red {
    color: #ff0000;
}
.orange {
    color: #ff8300;
}
.yellow {
    color: #ffff00;
}

Internet options:

Note that under Tools -> Internet Options -> Advanced scroll down to Printing, there is an option for Print background colors and images. This does not affect "Print Preview" or print. At lest not here. (Only tested on Windows XP as that is the only place where I have IE8.)

However setting it in Print Preview, sets it permanently. Again; at least here. It affects both direct print and print preview.



来源:https://stackoverflow.com/questions/22645762/font-colors-change-when-printing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!