How can I add watermarks on Phantomjs images?
Somewhat like this:
Can page.evaluate
help me here?
Any injection or while rendering should not affect the actual look of the webpage. This stamp should only overlay.
How can I add watermarks on Phantomjs images?
Somewhat like this:
Can page.evaluate
help me here?
Any injection or while rendering should not affect the actual look of the webpage. This stamp should only overlay.
The rendering is very high level in PhantomJS. The only way is to inject the watermark as an element (think position: absolute
) into the DOM through page.evaluate
and remove it after the screenshot.
Finally got it.
Created a new html element which is required, from DOM method and then injected this while rendering the HTML by page.evaluate
.