Aspose.CSS Documentation
Welcome to the Aspose.CSS documentation
Aspose.CSS is a family of HTML rendering APIs that bring browser-grade CSS layout to PDF documents and PNG images, inside your application and without running a browser. Design in HTML and CSS, check it in the browser, and ship the same layout from your own code. CSS fidelity is measured against Chromium and published with each release.
Choose Your Platform
- Aspose.CSS for .NET: render HTML and CSS to PDF and raster images from C# and other .NET applications. Available now as the Aspose.CSS NuGet package.
- Aspose.CSS for Java: add server-side HTML rendering and conversion to Java applications.
- Aspose.CSS for Python: automate HTML-to-PDF and HTML-to-image workflows in Python.
- Aspose.CSS for C++: integrate native HTML and CSS rendering into C++ applications.
Scope at Launch
Aspose.CSS renders HTML and CSS: the markup and stylesheets your application supplies, with images, fonts and stylesheets loaded from files, streams or your own resource handler. The layout engine covers block, inline and table layout, flexbox, grid, positioning, fonts with fallback, text shaping and bidirectional text. Output is PDF, with page size, margins and orientation from CSS @page, page margin boxes with page numbers, forced and avoided page breaks, widows and orphans, and PNG, JPEG and WebP images of the rendered page.
JavaScript is off by default; when you turn it on, document scripts run before layout within time, statement and memory budgets. Not part of the first release: running headers and running elements, repeated table headers across pages, tagged PDF, PDF/UA and PDF/A. These are listed here so that you can check a document’s requirements before evaluating; the supported-features page will carry the per-property detail.
Chromium Compatibility Report
CSS fidelity is measured, not asserted. Screen-layout geometry is compared with Chromium test by test on selected Web Platform Tests layout suites, and each release publishes its report here: the test selection and its size, the tolerance, the pass share per suite, and the known differences with their reasons. Finished-document comparisons (PDF and PNG of real pages against Chromium’s output) join the report as the pagination work lands.
What Aspose.CSS Is Designed For
- HTML to PDF: create fixed-layout PDF documents from HTML files, markup, or web content.
- HTML to images: render pages to raster formats for previews, thumbnails, archiving, and visual testing.
- Browser-grade CSS rendering: carry the layout you approved in the browser into the document, with fidelity measured against Chromium.
- Print-ready output: control page size, margins, orientation, resolution, media rules, and other rendering options.
- Application integration: run conversions in desktop, server, cloud, batch, and containerized workflows without a browser UI.
Availability: Aspose.CSS for .NET is the first released product of the family. The Java, Python and C++ editions are under development; product names, packages, API signatures, supported formats, links, and examples on their draft pages may change before release.
Documentation Coming Soon
The .NET page covers installation, a first conversion, licensing, and links to the API reference and release notes. Guides on supported input and output formats, page setup, image resolution, font handling, resource loading, security, performance, deployment, and troubleshooting are in preparation. Code examples and API reference links for the other platforms will be added as each platform API is finalized.