首页 > 代码库 > Phantomjs

Phantomjs

*

在phantomjs提供的例子js文件夹中,右键打开cmd窗口:

E:\OpenSource\phantomjs-2.1.1-windows\examples>phantomjs rasterize.js
Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]
  paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"
  image (png/jpg output) examples: "1920px" entire page, window width 1920px
                                   "800px*600px" window, clipped to 800x600

E:\OpenSource\phantomjs-2.1.1-windows\examples>phantomjs rasterize.js http://www.baidu.com e://temptest/phantomjs/123baidu.pdf
status:success

E:\OpenSource\phantomjs-2.1.1-windows\examples>phantomjs rasterize.js http://127.0.0.1/edsa-builder/ e://temptest/phantomjs/123baidu.pdf
status:success

E:\OpenSource\phantomjs-2.1.1-windows\examples>

 

*

Phantomjs