combine ( getOutputDir (), "convert-with-single-line.jpg" )) convertHTML ( "Convert HTML to Image in Java", ".", new ImageSaveOptions ( ImageFormat. Invoke the convertHTML() method to convert HTML to JPGĬom. You can convert HTML to Image in your Java application literally with a single line of code! The following Java code shows HTML to JPG conversion: Let’s look at HTML to Image conversion scenarios in Java examples! HTML to JPG by a single line of Java code In this article, you will find information on how to convert an HTML to Image File Formats and how to use Use one of the convertHTML() methods of theĬlass and pass the required parameters to it.Here you may set an image format (JPG, PNG, BMP, GIF or TIFF) and customize the rendering process to get the desired result. Load an existing HTML file from a local file system, URL, stream, or create HTML from scratch.Any HTML to Image conversion can be made with a few required steps: Aspose.HTML for Java library allows you to convert HTML documents to JPEG, PNG, GIF, TIFF and BMP file formats with full control over a wide range of conversion parameters.
0 Comments
Leave a Reply. |