[SOLVED] PDF doesn't take custom css

Hi,

in print format i’ve created some custom css with some classes, that work fine when I see the print preview
f.e.

But these custom classes are not shown when I see the PDF exprot.

Is there any solution on this issue? Of course I want the PDF looks similar to preview

You will have to wrap your custom CSS in @media print

2 Likes

Thank you @netchampfaris.
That doesn’t seem to work. I am getting the same result as above.
here is the piece of css I added:

@media print {
.docdraft {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
    }
}

Here’s what I found,

Adding, !important to your css rules will override bootstrap’s css

1 Like

You are great! Thank you @netchampfaris

If you have used ERPNext and liked it, then please help us spread the word by submitting your reviews on the following sites.

http://www.capterra.com/enterprise-resource-planning-software/spotlight/132657/ERPNext/Web%20Notes%20Technologies

http://alternativeto.net/software/erpnext/

https://www.getapp.com/operations-management-software/a/iwebnotes/

We as a community can achieve lot more than as individuals.

1 Like