Scenario:
I am trying to take the screenshot of the new web application created by the user using a background process. I am using wkhtmltoimage with Xvfb.
Issue:
Well the screenshot process is working perfectly fine but the issue is utf8 & HTML5 video in my case are not working only in server (Amazon VPC) but working in my local machine
My first guess for UTF8 issue was to add the UTF8 local language support i.e. en_IN.UTF8 but this did not do the trick.
When I saw the issue with HTML5 video, I tried serching for default browser or rendering engine xvfb uses. I wasn't lucky there but found wkhtmltoimage uses QtWebkit rendering engine.
Tried check out difference in installed packages between my local (Ubuntu 13.04) & server ubuntu 12.04. I almost found all packages related to QtWebkit same.
Possible Solution:
I am guessing the issue may be of the Browser/Rendering Engine which is invoked while taking the screen shot.
Here is the code:
xvfb-run --server-args="-screen 0, 1024x680x24" wkhtmltoimage --use-xserver -f png --quality 94 --javascript-delay 2000 --disable-smart-width --zoom 0.8 --encoding "utf-8" --enable-plugins --width 650 --height 600 http://google.com new.png
Few online Documentation I referred:
wkhtmltoimage doc1
wkhtmltoimage doc2
I am adding the images which are created both in local and server. Well local one has all the details I am looking for.
Local Machine Screenshot:
Amazon VPC Server Screenshot:
Please guide me on this. I am stuck with this from past 20 hours.
Regards,
Hbksagar
P.S: I started using xvfb because of the following errors while using wkhtmltoimage only such as:
- QWidget: Cannot create a QWidget when no GUI is being used
- QPixmap: Cannot create a QPixmap when no GUI is being used
with reference to This Article