Html Convert Image (Html2Image)

Source: Internet
Author: User
Class libraries that convert HTML webpages (text) to images

The above is a demo tool using the HtmlConvertImage (Html2Image) class library.

MSPlus. HtmlConvertImage mHCont = new MSPlus. HtmlConvertImage ();


// Set the length of an image. If the length of a webpage exceeds the length of an image, you can separate it into multiple images.
MHCont. ConvertImage (mUrl, Int32.Parse (textBox4.Text), mSaveTo, mFileName );


// All webpages are generated in one image
MSPlus. HtmlConvertImage mHCont = new MSPlus. HtmlConvertImage ();
MHCont. ConvertImage (mUrl, mSaveTo, mFileName );

The following is the split effect:

ATA0.PNG

ATA1.PNG

ATA2.PNG


HtmlConvertImage. Dll instructions

The file is automatically cut when the custom length is obtained. The file names of multiple images are returned.
Public String [] ConvertImage (String mUrl, Int32 mPageLength, String mOutputDir, String mOutputFile)

The webpage is saved as an image, and the image length is the webpage length. The image file name is returned.
Public String ConvertImage (String mUrl, String mOutputDir, String mOutputFile)

Set the watermark on the Image
Public string MarkStr

Essay: because of the needs of the project, I originally wanted to find a tool on the Internet that can complete Html2Image, but I only found one tool for half a day, and I still have to pay for it, and no DLL is just an EXE application (that is the http://www.sysimage.com/windows/html2image/default.aspx), but can only be self-developed. currently, the functions are relatively simple. If you are free, you can continue to improve the functions! Haha

Download HtmlConvertImage. RAR

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.