I'm trying desperately to give xvfb-run some resolution arguments to take screenshots of websites with wkhtmltox in different resolutions.
I'm using both xvfb-run and wkhtmltox on CentOS.
xvfb-run --server-args="-screen 0 1024x768x24" wkhtmltoimage http://www.whatismyscreenresolution.com/ /tmp/bla.png
Unfortunately my arguments are not respected by xvfb-run. It has always a resolution of 800x600. What am I doing wrong here?
Thanks for any help!
You forgot this option: --use-xserver
.
So the whole command is:
xvfb-run --server-args="-screen 0 1024x768x24" wkhtmltoimage --use-xserver http://www.whatismyscreenresolution.com/ /tmp/bla.png
(I tested with wkhtmltopdf, but it should be the same with wkhtmltoimage)
Add a comma between parameters. In your case "-screen 0, 1024x768x24"
.
Let me know if it helped you.
Regards,
HBK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With