HTML (Hyper Text Markup Language) is the extension for web pages created for display in browsers. Known as language of the web, HTML has evolved with requirements of new information requirements to be displayed as part of web pages. The latest variant is known as HTML 5 that gives a lot of flexibility for working with the language. HTML pages are either received from server, where these are hosted, or can be loaded from local system as well.
Convert from HTML
With GroupDocs.Conversion you can easily convert your HTML document into another file format. For example HTML to PDF conversion code snippet will look like this:
// Load the source HTML file
Converterconverter=newConverter("sample.html");// Set the convert options for PDF format
PdfConvertOptionsoptions=newPdfConvertOptions();// Convert to PDF format
converter.convert("converted.pdf",options);
Put it simply - you just load a HTML file into Converter, select desired output format and all the rest will be done by GroupDocs.Conversion.
Note
For more available conversions and formats compatibility check supported file formats.
Refer to API reference for more conversion options and customizations.
Convert to HTML
On the other hand, converting your files to HTML format is also quite simple and natural.
The following code sample demonstrates how to convert PDF document to HTML in Java using GroupDocs.Conversion.
// Load the source PDF file
Converterconverter=newConverter("sample.pdf");// Set the convert options for HTML format
MarkupConvertOptionsoptions=newMarkupConvertOptions();// Convert to HTML format
converter.convert("converted.html",options);
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.