php-phantomjs icon indicating copy to clipboard operation
php-phantomjs copied to clipboard

how to render png images?

Open eduardoarandah opened this issue 8 years ago • 1 comments

This command renders a jpg file with png extension:

$request->setOutputFile("example.png");

eduardoarandah avatar Jul 31 '17 14:07 eduardoarandah

In case anyone stumbles across this question, there is a function setFormat that can be set on a request object. So you would have something like this:

 $request->setOutputFile('/path/to/save/capture/file.jpg');
 $request->setFormat('png');

Mesuva avatar Apr 03 '18 05:04 Mesuva