How to add Server Print Format's styles


So i have been using inline-styles Server Print Format and it works okay. But the moment I use these Print Format to send email, all the styles are gone. Actually even the provided ‘Standard’ template doesn’t work…
I have checked the HTML generated inside the email’s attachment, it seems all styles are stripped off.


  1. So what is the correct way of adding this styles especially for Email ?
  2. How to make the Standard one work as expected

CSS does not work in email clients, only inline CSS does. The problem with HTML invoices is that it is very expensive to put all CSS inline.

Ans: Use PDF!

I did use PDF but it come out exactly like the HTML (attachment): No styles applied so I changed it to HTML attachment just to investigate…
So basically a <style> in the print template will be stripped off ? How do I define style then ?

Your CSS did not load correctly for wkhtmltopdf. We not seen this before. Check your links.

Yes, previously my hostname was not a real accessible link. Change to the correct link solved the issue.
One question though: if later on I restrict the server to be accessible only by certain range of IPs,
will it affect the email sending ?

Then you need to keep all CSS image files locally.