Aspose.HTML for Python via .NET Documentation – Parse & Process HTML

Aspose.HTML for Python via .NET Product Logo

Aspose.HTML for Python via .NET is a Python API for creating, loading, editing, saving, extracting data from, and converting web documents. Use it when your Python application needs programmatic control over HTML documents, DOM nodes, CSS, resources, website files, or output formats such as PDF, XPS, DOCX, PNG, JPG, TIFF, BMP, and GIF.

Python HTML Development Topics

Convert HTML to PDF in Python

The example below shows a common Aspose.HTML for Python via .NET workflow: load an HTML document, create PDF save options, and write a PDF file.

1import aspose.html as ah
2import aspose.html.converters as conv
3import aspose.html.saving as sav
4
5document = ah.HTMLDocument("document.html")
6options = sav.PdfSaveOptions()
7conv.Converter.convert_html(document, options, "output.pdf")

For more output formats and conversion settings, see the HTML conversion guides.

Aspose.HTML for Python via .NET Resources

Aspose.HTML also provides free online HTML applications for conversion, merging, SEO analysis, code generation, URL tools, and web accessibility checks. Use the web apps for quick manual tasks, and use Aspose.HTML for Python via .NET when you need the same HTML workflows automated in Python applications.

HTML Web Applications