Hi All, Team,
I’ve set up a print format as shown in screenshot 1 below.
The demand notice number on the sales invoice is supposed to be in red and indeed it appears so in the print preview as well as the pdf view (see screenshots 2 & 3)
However, when I get it in email, the formatting is lost and the demand notice number does not appear in red. (see screenshot 4)
Would be glad for any help.
Screenshot 1 - Print Format
Screenshot 2 - Print Preview
Screenshot 3 - PDF Preview
Screenshot 4 - PDF sent through mail
Hi, could you try
<b style="color:red !important;">
@Chude_Osiegbu this is a problem I have been having in ALL forms when printing and emailing for a while now!
Prior to the v5 upgrade my Print Formats had nice black backgrounds in tables, printed key fields in RED and recognised <th> (prints grey background). Since upgrade these have all stopped working on print formats. I have tried all settings in browser (print background images, etc) and also tried using CSS inline, CSS inheader, <div> instead of table, etc, etc. but nothing changes. So I assume this must be somewhere in frappe over-riding my settings. Please help and advise, we need colours for du…
I have not been able to resolve this still, so very interested if you have any ideas. I have tried a number of things including tags like !important to no avail. In the end I just assumed the CSS server side is over-riding my settings and there’s not much I can do being on the cloud - would be very happy to be proven wrong and fix this though
Unfortunately, using the important! tag didn’t work.
Just tested with tag
!important, worked for me on PDF and other formats.
@KanchanChauhan, it works for me too on the client side but when the same pdf is sent as an attachment in email by ERPNext to a contact, the colour is lost.
You can apply font-color as well as background color using bellow CSS:
In this css it is applying background color, border, alignment.
background-color: grey !important;
text-align: left !important;
vertical-align: middle !important;
width: 25px !important;
height: 20px !important;
You can use this CSS as class in your tag:
This worked for me while export it to PDF and/or Print.