Search code examples
c#.netblazor-server-sidewkhtmltopdf

WkHtmlToPdf-DotNet automatically moves div to a new line?


I am trying to save a table into a PDF on my Blazor project.

Blazor can successfully render the correct formation of the table.

However, it seems that WkHtmlToPdf automatically moved div to a new line when I tried to generate a PDF file.

WkHtmlToPdf Generated Result

I want it to be displayed as a table.

Blazor Rendered Result

I tried Bootstrap col row but no luck.

Or is my coding wrong? I can post it on CodePen if necessary.


Solution

  • Apparently WkHtmlToPdf does not support multiple columns.
    Use table or other libraries if you want to generate PDFs.