打印时字体颜色改变 [英] font colors change when printing

查看:791
本文介绍了打印时字体颜色改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个真正令人困惑的问题。我有一个动态建立的表(可能是一个不重要的事实,但只是你知道)。在网页上,我根据逻辑标准将文本设置为特定颜色。在页面上,它看起来不错。当打印预览(和实际打印)时,颜色是非常不同的。

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.

在我的代码中,颜色为:
红色 - FF0000
橙色 - FF8300
黄色 - FFFF00

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??

推荐答案

您需要启用打印背景颜色和图片。

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.

      

      

Web Render:
打印之前:<​​img src =https://i.stack.imgur.com/0ptSC.pngheight =320title =打印选项的背景颜色和图像/>
打印后:

<table border=1>
   ...

使用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;
}






kbd>向下滚动到打印,可以选择打印背景颜色和图像。这不会 影响打印预览或打印。至少不在这里。 (仅在Windows XP上测试,因为这是唯一有IE8的地方。)


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.

这篇关于打印时字体颜色改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆