0
body {}
.table{
    background-color:aqua
}

this is my StyleSheet1.css saved in my local at C:\Users\ingyadav\Documents\Visual Studio 2015\Projects\StyleSheet1.css

<html>
<head>
    <link rel="stylesheet" href="file:///C:/Users/ingyadav/Documents/Visual Studio 2015/Projects/StyleSheet1.css" type="text/css"  />
</head>
<body>
    <table class="table" border="1" style="width:300px;height:500px">
        <tr style="width:auto">
            <td style="width:150px;height:500px"></td>

            <td>
                <table border="1" style="width:150px;height:500px">
                    <tr style="width:auto"><td></td></tr>
                    <tr style="width:auto"><td></td></tr>
                    <tr style="width:auto"><td></td></tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

And this is my HTML string to be loaded into pdf now

when i pass this to the evo html to pdf converter,its not loading the external css into the pdf.

in evopdf support they mentioned to provide the fully qualified URL's but after using proper URL also its unable to load the external css.

can anyone help me on this please.

aggy
  • 163
  • 1
  • 2
  • 14
  • I asked this question long time ago. http://stackoverflow.com/questions/18082336/cannot-apply-css-to-the-html-string?noredirect=1#comment62295271_18082336 I also emailed the EVOPDF support group, I didn't get an answer from them. But to disappoint I could not solve the issue. Also, I was using the trial version and thought that could have been a suspect – Rabin Jun 03 '16 at 16:08

1 Answers1

0

No you cannot specify multiple locations in the href attribute. Per the spec, each <link> represents a document that is connected to your html. So by design it would be only one document.

More Example: https://www.w3.org/TR/html401/struct/links.html#h-12.3

Ivin Raj
  • 3,448
  • 2
  • 28
  • 65
  • Click here try this one @govardhan – Ivin Raj May 23 '16 at 13:47
  • ok @lvin Raj i removed the href part in head tag also.....but also its not loading the css into pdf – aggy May 23 '16 at 13:47
  • @govardhan call css specify folder locations in your project – Ivin Raj May 23 '16 at 13:51
  • @lvin Raj my question is im able to load anything into pdf using evohtmltopdf....but if i apply any css class which is present in the external css and included that css file in the html string using link tag '' after loading the whole html string into the convert html to string part its not applying the css in the pdf – aggy May 23 '16 at 13:53
  • @lvin Raj i have done the same thing....just look at html string posted in the question – aggy May 23 '16 at 13:57