I have just recently upgraded my website (.NET Framerwork 4.7.2) with the latest Bootstrap Version (from v4 to v5) and I use selectPDF to convert a page into a PDF. However, I noticed that the PDF is now not rendered correctly (The table border that uses Bootstrap Class is missing). I used SelectPDF version 18.4 before and currently use the latest version of SelectPDF (version 24), but it still does not work.
This is the Dropbox link to the HTML source and the PDF result: Link
The PDF looks like this (the borders are missing)
The relevant C# Code is pretty straightforward. I also use PdfSecurityManager, but I don't think it is relevant for this question
using SelectPDF;
HtmlToPdf converter = new HtmlToPdf();
string html = "the HTML content"; //the content can be found on the link above.
PdfDocument doc = converter.ConvertHtmlString(html);
How do I resolve this?
So I got a response from SelectPDF Support. I need to download the Blink rendering engine by downloading Select.Pdf.NetCore.Blink
from the Nuget additionally on top of Select.Pdf.NetCore
. I also need to download the Blink rendering engine file (Can be downloaded here) and put it in the same "bin" folder as the application. Now my PDF is rendered correctly.
Support PDF Response:
Please try using Blink rendering engine with newer javascript libraries. Even though you might have not changed your html too much, the Bootstrap changed a lot to use newer javascript that is not fully supported by our default rendering engine (WebKit).