HTML CSS support

Hello support …

We have tried to build a html template with data binding to convert into pdf files …

The html will include grid-template-columns , the html can display OK in browser ( Edge or Chrome ) and seems not OK while been converted into pdf file …

You can check the uploaded html sample ( renamed as txt ) for your reference … (472 Bytes)

Regards …

Mason Pai 10-21-2022


Would you please share the sample code snippet with us as well that you used to convert the HTML file into PDF? We will test the scenario in our environment and address it accordingly.

Hello …

Here is the sample code for your reference …

        string DataDir = @"D:\Project\Sample\Aspose.html\";
        string OutputDir = @"D:\Project\Sample\Aspose.html\";

        // Prepare a path to a source HTML file
        string documentPath = Path.Combine(DataDir, "document.html");

        // Prepare a path for converted file saving 
        string savePath = Path.Combine(OutputDir, "document.pdf");

        // Initialize an HTML document from the file
        HTMLDocument document = new HTMLDocument(documentPath);

        var options = new PdfSaveOptions()
            HorizontalResolution = 200,
            VerticalResolution = 200,
            JpegQuality = 100,

        // Convert HTML to PDF
        Converter.ConvertHTML(document, options, savePath);

document.html has been attached as ZIP file (470 Bytes)


We are checking it and will get back to you shortly.


An issue as HTMLNET-4079 has been created in our issue management system for further investigation. We will further look into its details and keep you posted wit the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello …

Can you help to provide what CSS features have been supported by Aspose.HTML ?

thanks !!

Mason Pai 10-23-2022


We are collecting related information and will share with you shortly.


This is a rather difficult question. The CSS specification is constantly changing and evolving, so features that are fully supported today may not be fully supported tomorrow. We would say that we support most of CSS 2.1, and we are constantly updating property support from CSS 3.