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 …

document01.zip (472 Bytes)

Regards …

Mason Pai 10-21-2022

@masonpai0212

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);

PS:
document.html has been attached as ZIP file

document.zip (470 Bytes)

@masonpai0212

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

@masonpai0212

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

@masonpai0212

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

@masonpai0212

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.