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