Search code examples
htmlcsspdf.net-coreselectpdf

SelectPDF .net core free edition: CSS issue in final pdf


I have an issue while using Select.HtmlToPdf.NetCore v 21.1.0. please refer screenshot below which contains various view of final HTML content in different browsers or visualizers and final PDF output of same HTML

HTML visualizer view in runtime VS 2019 of final html before pdf HTML visualizer

Same HTML copies separately to view first in chrome chrome render of same html

ans second in Internet explorer(not edge) Internet explorer but NOT EDGE, some old like 7,8

And final PDF generated look like this final pdf generated

Now, i feel that certain CSS used while designing HTML which works in chrome does not work in HTML visualizer and also in selectPDF package as well which i am using.

Also, IE and HTML Visualizer render is almost similar to PDF output.

My question now is how do i find out which css is not working out? how do i design my html, now that i have to be dependent on Internet explorer? what should i do like what kind of CSS i should use which can render on chrome and this selectpdf in sync? (i am not so good with css) Any suggestion or help to fix this is will be highly appreciated. thanks in advance.


Solution

  • Use of CSS applicable and accepted by all the popular browsers solved the issue