开发者

On Windows 7 using imagemagick to convert from HTML to PNG

开发者 https://www.devze.com 2023-03-20 08:52 出处:网络
By any chance on Windows 7 using a batch file via DOS and/or Powershell is it possible to use imagemagick to convert from HTML to png? (not tr开发者_如何学编程ying to capture webpages)

By any chance on Windows 7 using a batch file via DOS and/or Powershell is it possible to use imagemagick to convert from HTML to png? (not tr开发者_如何学编程ying to capture webpages)

I have several directories of HTML pages that I would like to convert to PNG. I have Imagemagick installed and if possible would like to use it or another opensource/freeware solution to convert the html pages to PNG.

Thanks for any insights.


Phantom JS needs a little bit of scripting (js) but it is very convenient to get the rendered html converted into an image : http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering


Yes ! You can make PNG images from HTML render pages with imageMagick. Type in a terminal window (cmd.exe in MS Windows 7) :

convert yourPage.html Newimage.png

It is the same command line in Linux.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号