Aspose.CSS for Python brings modern CSS layout to HTML rendering from Python: flexbox, grid and document flow, rendered to PDF documents and PNG images inside your own process. Page size, margins, orientation and breaks are set with CSS; fonts, images and stylesheets load from files, streams or your own resource handler. Screen-layout geometry is measured against Chromium on selected Web Platform Tests layout suites, and the compatibility report is published with each release. Aspose.CSS for Python is in development; the .NET release ships first, with Python, Java, C++ and TypeScript following on the same engine design.

Aspose.CSS for Python Features

Browser-designed documents: the CSS layouts your team designs in the browser, carried into application output

CSS flexbox layouts

CSS grid layouts

Document flow: block, inline and table layout

HTML to PDF

HTML to PNG

PDF page setup: size, margins and orientation with CSS @page

Page breaks: forced and avoided breaks, widows and orphans

Fonts and text: system and embedded fonts, fallback, shaping and bidirectional text

Resources from files, streams or your own handler

In-process rendering: no browser to install, automate, update or secure

Chromium compatibility report published with each release

Designed in the Browser, Delivered as a Document

Your team already builds templates in HTML and CSS and checks them in a browser. Aspose.CSS for Python takes that layout into the PDF documents and PNG previews generated by your scripts and services, so what you approve on screen is what you deliver, without deploying a browser process.

Measured Against Chromium

CSS fidelity in this engine is based on measurement, not just a list of supported features. Screen-layout geometry is compared test by test against Chromium on selected Web Platform Tests layout suites, and the documentation publishes a compatibility report for each release with the test scope, tolerance, results and known differences.

  

Aspose.CSS is also in development for the following platforms: