We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert HTML to PDF in C# using Aspose.PDF - Bootstrap CSS is not working

We are trying to convert an HTML file with CSS to PDF
In the result PDF background colors are not shown


This is the code used to produce PDF output

 Dim license As New Aspose.Pdf.License()
        Dim dataDir As String = "C:\PDF\"
        Dim dataDirCss As String = "C:\PDF\css"
       Dim output As String = dataDir & "BootstapHTML.html"
        Dim options As HtmlLoadOptions = New HtmlLoadOptions(dataDirCss)
 Dim pdfDocument As Aspose.Pdf.Document = New Aspose.Pdf.Document(output, options)

        pdfDocument.Save(dataDir & "BootstapHTML.pdf")


Thanks for contacting support.

We were managed to replicate the issue in our environment while testing the scenario using Aspose.PDF for .NET 20.1. Therefore, we have logged it as PDFNET-47565 in our issue tracking system. We will surely look into details of it and keep you posted with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-47565) have been fixed in Aspose.PDF for .NET 22.5.