using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
namespace 排队取号软件
{
class HtmlToImage
{
/// <summary>
/// HTML页面转image
/// </summary>
/// <param name="HtmlUrl">Url</param>
/// <param name="imageWidth">图片宽度580</param>
public static void Go(String HtmlUrl, int imageWidth)
{
Process processInstance = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = true;
startInfo.CreateNoWindow = true;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = @" --quality 100 --width " imageWidth " --disable-smart-width " HtmlUrl
" page.jpg";
startInfo.FileName = Application.StartupPath "\\HtmlToImg\\wkhtmltoimage.exe";
processInstance.StartInfo = startInfo;
processInstance.Start();
processInstance.WaitForExit();
}
}
}
资源文件列表
HtmlToImage.cs , 1146
HtmlToImg/libgcc_s_sjlj-1.dll , 489773
HtmlToImg/libstdc++-6.dll , 6762827
HtmlToImg/libwinpthread-1.dll , 243109
HtmlToImg/vcredist_x64.exe , 7195312
HtmlToImg/vcredist_x86.exe , 6505008
HtmlToImg/wkhtmltoimage.exe , 37714432
╦╡├≈.txt , 32