When Converted Html to Pdf document, linked css not rendered.
See original GitHub issueI want to create a report which has data from web services, charts, tables, pictures. While converting html to pdf, scripts works but css not rendered.
We have an application works .net framework and MVC pattern.
Css Path are located below.
<link href="~/Rapor/SablonCss/FONRAPOR" rel="stylesheet" />
This comes from databese because styles inserted on db. Rapor is a controller name, SablonCss is an action name.
But if we located as css file at physical directory, it works. Hovewer if we will change css code on database, it should be worked. Not take from physical path.
Physical Located File Path
<link href="~/Content/MasterSablon.css?ver=1.0.4" rel="stylesheet" />
<link href="~/Content/Sablon.css?ver=1.0.4" rel="stylesheet" />
By the way Chromium works as headless = false, because of an our web service’s process.
Expected Result Önizleme (6).pdf
Actual Result 22952_HKV_17042020_sirketbulteni.pdf
How to solve this issue?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
I tried to set PrintBackground to true as a pdf options and works it. Thanks for your help…
It seems to come from the presence of @media tag in my default css file.