Features List – Aspose.HTML for Python via .NET
Aspose.HTML for Python via .NET is an advanced HTML processing API to perform a wide range of management and manipulation tasks within cross-platform applications. API is designed to create, modify, extract data, convert and render HTML documents without any external software. Also, it supports popular file formats such as EPUB, MHTML, XML, SVG, and Markdown and rendering to PDF, DOCX, XPS and Image file formats. Moreover, the HTML Document Object Model is integrated with embedded formats and specifications such as CSS, HTML Canvas, SVG, XPath and JavaScript out-of-the-box that extend the manipulation functional and rendering quality.
Aspose.HTML for Python via .NET provides a rich set of features, related to many different areas:
Document Manipulation
- Create a new or open an existing (X)HTML or SVG document. With the help of Aspose.HTML for Python via .NET you will be able to open document not only from the local file, but directly from the web!
- Save the document along with all the referenced resources, such as CSS and images. Aspose.HTML for Python via .NET offers you a highly customizable saver, which is able to save not only the document itself, with all the referenced resources but also other documents referenced by it.
- Create, edit, remove and replace HTML nodes via the rich API based on the Document Object Model (DOM) defined in the official documentation.
- Configure a Sandbox environment that is independent of the execution machine, ensuring a secure and isolated environment for running and testing.
Data Extraction
Aspose.HTML for Python via .NET can be used to collect information from the opened document:
- Navigate through the HTML elements with the help of DOM API. Aspose.HTML for Python via .NET implements Traversal interfaces which allows you to easily navigate through the DOM tree.
- Collect information from the HTML documents, using high performance XPath queries. Aspose.HTML for Python via .NET supports XPath 1.0 interfaces, defined in the official documentation.
- Collect HTML elements, by executing CSS Selector queries. Aspose.HTML for Python via .NET implements CSS Selectors API according to the lates documentation.
Converters
One of the main goals of Aspose.HTML for Python via .NET – is to provide simple, highly customizable and precise converters.
Simplicity: The Python API allows for effortless conversions of HTML, XHTML, SVG, EPUB, and MHTML into various formats with minimal code. For example, converting HTML to PDF can be accomplished with just one line of code:
1from aspose.html.converters import *
2from aspose.html.saving import *
3
4Converter.convert_html("<span>Hello, World!!</span>", ".", PdfSaveOptions(), "output.pdf")
Сustomizability: Aspose.HTML for Python via .NET offers extensive customization options for the conversion process. Beyond typical settings like page size or image resolution, it allows for detailed adjustments such as processing of external resources, applying custom style sheets, and more.
Precision: All the components of Aspose.HTML for Python via .NET assembly are designed according to the official HTML and SVG documentations. Which leads to high precision conversion results.
Aspose.HTML for Python via .NET provides a range of converters categorized into three main groups:
- Fixed layout converters. These converters are responsible for conversion of HTML, XHTML, SVG, EPUB, and MHTML to PDF, XPS, DOCX and raster image formats (PNG, JPG, BMP, GIF, TIFF).
- Markdown converters. These converters are responsible for conversion of Markdown to HTML and HTML to Markdown.
- Template converter. Which is used to create HTML files from templates.
You can explore all the available converters on the Converting Between Formats.
Built-in Formats
A real-world HTML page comprises a complex interplay of various formats, making high-quality conversion a challenging task. Aspose.HTML for Python via .NET addresses this complexity by supporting a comprehensive range of HTML-related formats:
- HTML Parser conforms to the latest HTML5 specification, ensuring accurate DOM tree generation.
- Our JavaScript processing engine supports ECMA 5.1 specification, enabling the execution of most scripts during parsing or runtime. We also provide you the ability to specify JavaScript processing timeout or completely disable scripts execution.
- CSS3 Support includes advanced CSS manipulation capabilities, allowing you to manage stylesheets for the entire document or specific nodes.
- HTML Canvas is fully supported, enabling drawing via JavaScript or the HTML Canvas API.
- SVG parsing and rendering is based on the lates SVG 2.0 documentation. Which allows you to use such modern elements as filters!
Platform Independence
Aspose.HTML for Python via .NET can be used to develop applications for a vast range of operating systems, such as Windows, where Python 3.5 or later is installed. You can build both 32-bit and 64-bit Python applications.