When i convert a page with css style for page break inside my page that i want it to be converted not doing page breaking into two pages.
- Code: Select all
<html>
<head>
<title>page with breaks</title>
<style type="text/css">
.page-break { display: block; page-break-before: always; }
</style>
</head>
<body>
<div> some content here </div>
<div class="page-break"></div>
<div> some content here </div>
</body>
</html>
in C# code
- Code: Select all
String url = "http://localhost/mypage.html";
var doc = new PdfDocument();
var thread = new Thread(() => doc.LoadFromHTML(url, true, true, true));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
var fileStream = new MemoryStream();
doc.SaveToStream(fileStream);
how to solve this.