rdvojmoc / DinkToPdf

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
MIT License
1.09k stars 417 forks source link

.net core web app published stylesheet doesn't work #127

Open NickersWeb opened 3 years ago

NickersWeb commented 3 years ago

new ObjectSettings() { WebSettings = new WebSettings() { UserStyleSheet = Path.Combine(Directory.GetCurrentDirectory(), @"ClientApp\public\stylesheet.css") } HtmlContent= str.ToString() } Local debugging this works fine. When I publish and view the pdf, the stylesheet is not implemented. The directory seems correct when I logged the directory path. Does it need to be an absolute path? I can't seem to get it to work otherwise.

The public directory is accessible, I can access this style sheet and images.

Using 64 bit libwkhtmltox.dll

mkkb917 commented 1 year ago

I am facing the same problem of formating here still no responce