| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Product Page | Docs | Release Notes | Download | Demos | API Reference | Blog | Free Support | Temporary License
This repository contains code examples, starter templates, and microbenchmarks demonstrating how to use Aspose.HTML for Java – a powerful library for working with HTML, MHTML, EPUB, Markdown, SVG, and various output formats in Java applications.
Aspose.HTML for Java enables developers to load, parse, generate, modify, and convert HTML documents in any Java environment, including desktop, server-side, microservices, and cloud applications.
This repository works hand in hand with the official Aspose.HTML for Java documentation. The examples provided here are intended to complement the documentation, extend it, and provide ready-to-use code snippets for processing, parsing, converting, and rendering HTML-based documents, working with the DOM, and more.
Each example in the repository serves as a practical, ready-to-run usage scenario. More information about a wide range of document processing, conversion, and DOM manipulation functionality can be found here.
Gradle. – Define Aspose.HTML for Java API dependency in your build.gradle script:
compile(group: 'com.aspose', name: 'aspose-html', version: '25.12', classifier: 'jdk16')Maven:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-html</artifactId>
<version>25.12</version>
<classifier>jdk17</classifier>
</dependency>import com.aspose.html.converters.Converter;
import com.aspose.html.saving.PdfSaveOptions;
// Invoke the convertHTML() method to convert the HTML to PDF
Converter.convertHTML("<h1>Convert HTML to PDF!</h1>", ".", new PdfSaveOptions(), "convert-with-single-line.pdf");Extract and save a wab page with default save options in Java
import com.aspose.html.HTMLDocument;
// Initialize an HTML document from a URL
final HTMLDocument document = new HTMLDocument("https://docs.aspose.com/html/net/message-handlers/");
// Prepare a path to save the downloaded file
String savePath = "root/result.html";
// Save the HTML document to the specified file
document.save(savePath);See all examples in Aspose.HTML-for-Java.Example
Contributions are welcome! Feel free to submit PRs with new examples, fixes, or enhancements.
Product Page | Docs | Release Notes | Download | Demos | API Reference | Blog | Free Support | Temporary License
| Back | FazBrowse Home | New Git URL |