How to convert HTML to Image using vb.net

Article from our customer

Hi
Our law firm serves many customers around the world! For the convenience of our customers, we launched the online service that allows to view court decisions, regulations and orders!

On our site created a comfortable private office, which realized the possibility of online viewing of all documents in HTML. If desired, our client can convert the document from the format Html formats Word, PDF or Images!

Implementation of the function to convert from HTML to Images we have entrusted the company “SautinSoft” and .Net component – PDF Vision.

Below listed implementation of converting from HTML to Images:

'Convert HTML file/url to Image file
        Dim v As New SautinSoft.PdfVision()
 
        'Convert image file to image file
        Dim imagePath As String = "C:\Web\Images\"
        Dim ret As Integer = v.ConvertHtmlFileToImageFile("http://www.sautinsoft.net",imagePath)
        ' 0 - converting successfully
        ' 1 - can't open input file, check the input path
        ' 2 - can't create output direction, check the output path
        ' 3 - converting failed
        If ret = 0 Then
            'Show produced image in Image Viewer
            System.Diagnostics.Process.Start(imagePath)
        End If

Get other details you may at SautinSoft company website: http://www.sautinsoft.com

Share on Facebook

Leave a Comment

Your email address will not be published.