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

Free Support Forum - aspose.com

Converting Html to PDF with multi-column CSS doesn't work as expected

We are evaluating Aspose.PDF to convert HTML documents to PDF. Within our test Html is areas of the document that has CCS3 multi-column attributes. When converting to PDF the multi-column CSS is not respected and only a single column is outputted. I note that multi-columns are supported when manually creating a PDF document however, it seems the automatic conversion doesn’t. How do I ensure multiple columns CSS is supported during the conversion, please?

Example c# Code:
HtmlLoadOptions options = new HtmlLoadOptions();
Document pdfDocument = new Document(dataDir + “HTMLToPDF.html”, options);
pdfDocument.Save(“HTMLToPDF_out.pdf”);

Example HTML:

<head>
    <meta charset="UTF-8">
    <title>Lorem ipsum pdf</title>
    <style>
        body {
            font-size: 36px;
        }

        .newspaper {
            columns: 4;
        }
    </style>
</head>

<body>
    <div class="newspaper">
        <p>
            Justo nibh velit congue. Fames lorem purus potenti nascetur primis curae; habitasse. Tempor amet nisl, lacus vestibulum pulvinar. Integer laoreet quam, mus facilisi id sociosqu vehicula. Taciti id quisque ridiculus ligula etiam ad at dignissim primis suscipit. Nam scelerisque tincidunt platea vel mi tincidunt magna. Hac iaculis ridiculus tortor maecenas aenean vehicula class. Class; at urna euismod a? Hac mattis porttitor nascetur fusce. Penatibus vehicula dis blandit ullamcorper sollicitudin quam leo ornare. Eget inceptos metus platea placerat. Arcu ligula placerat tellus lobortis nisl erat. Tempor dictumst morbi nisi inceptos fames sollicitudin. Bibendum condimentum porttitor elementum. Magna tristique ullamcorper auctor a dignissim. Curabitur consequat suspendisse?
        </p>
        <p>
            Suspendisse praesent orci vestibulum taciti vulputate fames. Id dictum malesuada egestas cursus non viverra hendrerit cursus litora, vehicula rhoncus. Sollicitudin rhoncus erat venenatis bibendum nisl praesent pulvinar torquent amet potenti et. Porta ridiculus nullam mi hendrerit gravida inceptos lobortis. Litora, orci eu varius scelerisque. Montes donec tempor mauris quis natoque in imperdiet torquent. Laoreet.
        </p>
<p>
            Turpis, habitasse metus potenti sodales viverra cubilia magna adipiscing. Dapibus primis torquent aenean ut sodales venenatis ipsum eros duis iaculis ultricies montes. Laoreet pulvinar volutpat fermentum dignissim felis ac. Pulvinar laoreet lorem dui pellentesque fusce nascetur aenean volutpat. Elementum dictum dapibus nisi a dictumst litora curae; feugiat purus. Nascetur lobortis himenaeos praesent quam nullam elementum himenaeos habitant. Laoreet mollis himenaeos magnis lobortis parturient class inceptos vehicula. Facilisi sed tempor dolor cum pharetra, platea dui porta viverra velit ullamcorper! Nec sapien, pellentesque condimentum feugiat eros ultricies et urna dignissim. Eu nulla viverra lobortis conubia? Senectus ac morbi pretium.
        </p>
        <p>
            Ad justo posuere sagittis mus. Volutpat inceptos nisi et, imperdiet consectetur fringilla felis aenean mollis risus sociis. Vestibulum diam senectus convallis arcu cras lectus inceptos vestibulum, lorem potenti egestas. Augue porta adipiscing dignissim sed neque habitant sodales habitasse posuere senectus lobortis. Laoreet per pretium habitasse arcu cubilia conubia tempus cras magna accumsan interdum. Nam proin primis congue mus. Torquent lorem dolor ante in aenean senectus ridiculus donec porta lobortis cursus ligula. Vel, in sed a vivamus fermentum lorem et ad nisi varius aliquet aenean. Cum scelerisque vulputate leo consectetur fringilla!
        </p>
</div>
</body>
</html>

@anthony.kay

Thanks for contacting support.

A feature request as PDFNET-48043 has been logged in our issue management system for your requirements. We will definitely investigate the feasibility of this feature and keep you posted with the status of its availability. Please be patient and spare us some time.

We are sorry for the inconvenience.

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