-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathwebshot.node.txt
27 lines (25 loc) · 2.16 KB
/
webshot.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
┏━━━━━━━━━━━━━┓
┃ WEBSHOT ┃
┗━━━━━━━━━━━━━┛
WEBSHOT(URL|HTML_STR|FILE #Takes screenshot with PhantomJS PAGE.render()
[, FILE2][, OBJ] #Version 0.15.3
[, FUNC(ERROR, ISTREAM)]) #Can either use FILE2 or ISTREAM
#OBJ:
# - any PhantomJS PAGE options, including paperSize, zoomFactor, cookies, customHeaders,
# onLoadFinished, onResourceRequested, settings (so any openUrl() OBJ2 parameters too)
# - siteType STR: "html" if HTML_STR, "url" (def) if URL, "file" if FILE
# - windowSize: width|height NUM|"all" (like PAGE.viewportSize, def: 1024x768)
# - shotSize: width|height NUM|"all|window" (like PAGE.clipRect, def: "window")
# - shotOffset: left|right|top|bottom NUM (like PAGE.clipRect, def: 0)
# - userAgent STR
# - phantomPath STR (def: "phantomjs"): if module not installed locally
# - phantomConfig OBJ: passed to PAGE.create(ARG_STR)
# - defaultWhiteBackground BOOL: if true (def: false), sets document.body.bgColor = "white"
# - customCSS CSS_RULES
# - quality NUM (def: 75): passed to PAGE.render()
# - streamType "jpeg|png" (def: auto based on extension): passed to PAGE.render().
# - renderDelay NUM: between PAGE.openUrl() and PAGE.render()
# - takeShotOnCallback BOOL: if true (def: false), waits for web page to call
# WINDOW.callPhantom("takeShot") to take screenshot
# - timeout NUM: like PAGE.render() resourceTimeout
# - errorIfStatusIsNot200 BOOL: if true (def: false), don't take screenshot if non-200 status