I'm currently working on integrating evoPDF into my asp.net application. When I click on a part of the HTML file, I send that portion using AJAX. So far, everything is working well up to this point. However, when I try to use the following methods from the EvoPdf API:
1. GetPdfBytesFromHtmlStream(Stream, Encoding,urlbase)
2. SavePdfFromHtmlStringToFile(String html,string filename,urlbase)
The HTML chunk I am sending looks something like this:
<ol class = "lol">
<li> HEY </li>
<li> Now </li>
</ol>
The CSS in the external file is defined as:
.lol {
background-color: red;
}
According to the documentation, the third argument should be the full URL of the original HTML where you extracted the chunk from. Since using localhost/3232 didn't work, I uploaded my app online. Despite this, I can't seem to get the CSS applied to the generated HTML. The documentation also suggests adding:
<HEAD> <BASE HREF="full url to your html file"> </HEAD>
And then utilizing this method:
pdfConverter.GetPdfBytesFromHtmlString(String html);
However, none of the above attempts have successfully applied CSS. Any ideas on how to fix this issue?