I have a testing setup where I drive PhantomJS through Selenium. Now I'd like to save screen captures as PDF files instead of getting them as plain PNG.
PhantomJS could do this out of the box by calling render on the current webpage instance.
However, how can I get that instance in code that is executed in PhantomJS with a JavaScriptExecutor? Is that even possible?