- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 09:58 AM
Using window.print() on UI page to have a print popup. The popup does not retain the color of the text on the UI page. Has anyone have this happen?
Any help would be useful.
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 10:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 10:09 AM
Hi,
Try using @media print css to enable color. So in your UI page add a style tag and the color of the text using @media print. For reference use the link below:-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 10:32 AM
Thank you for the reply.
Tried a couple of things and it didn't work. Already have @media print for excluding href links on the popup. Could you let me know the syntax for color wrt the div below?
<style>
@media print {
a[href]:after {
content: none !important;
}
</style>
<div style="text-align:left; color:red">MESSAGE</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 10:38 AM
<style>
@media print {
div {
color: red !important;
}
</style>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 10:42 AM
Also, even if the print preview does not show up the color the printed material would get the color specified if you were to print from the print window. In a print window, it is still media of screen so it may not show up. If you are particular to show the color on the print screen, you might have to use javascript to make that change.