HandlebarsJs.Net 链接样式 Sheets/CSS
HandlebarsJs.Net linking Style Sheets/CSS
我正在尝试在 C#.net class 文件中渲染 CSS 和我的 HTML,如下所示,但样式未渲染。其他一切工作正常。我该如何link样式表?
string source =
@"<html>
<head>
<style type=""text/css"" href="styles.css">
</head>
<body>
<div>
<h1>{{title}}</h1>
<div class="myclass">
{{body}}
</div>
</div>
</body>
</html>";
var template = Handlebars.Compile(source);
var data = new {
title = "My new post",
body = "This is my first post!"
};
var result = template(data);
此问题与 Handlebars.Net 无关,而是 improper usage of Itextsharp:
the problem is with the Itextsharp.dll we are using to render the css to the pdf file.
我正在尝试在 C#.net class 文件中渲染 CSS 和我的 HTML,如下所示,但样式未渲染。其他一切工作正常。我该如何link样式表?
string source =
@"<html>
<head>
<style type=""text/css"" href="styles.css">
</head>
<body>
<div>
<h1>{{title}}</h1>
<div class="myclass">
{{body}}
</div>
</div>
</body>
</html>";
var template = Handlebars.Compile(source);
var data = new {
title = "My new post",
body = "This is my first post!"
};
var result = template(data);
此问题与 Handlebars.Net 无关,而是 improper usage of Itextsharp:
the problem is with the Itextsharp.dll we are using to render the css to the pdf file.