Setting permissions for xvfb-run and wkhtmltopdf / wkhtmltoimage

I am desperately trying to give xvfb-run some permission arguments to take screenshots of wkhtmltox websites in different resolutions.

I am using xvfb-run and wkhtmltox for CentOS.

xvfb-run --server-args="-screen 0 1024x768x24" wkhtmltoimage http://www.whatismyscreenresolution.com/ /tmp/bla.png 

Unfortunately, my arguments are not followed with xvfb-run. It always has a resolution of 800x600. What am I doing wrong here?

Thanks for any help!

+6
source share
2 answers

You forgot this option: --use-xserver .

So the whole team:

 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)

+5
source

Add a comma between the options. In your case, "-screen 0, 1024x768x24" . Let me know if this helped you. Regards, HBK

+2
source

All Articles