title: webkit2png.py - Scrollbars always visible
body: <p>I'm using the <a href="https://github.com/AdamN/python-webkit2png" rel="nofollow">webkit2png.py</a> script to take some screenshots on a headless Linux server. I'm running into a super annoying issue where the screenshots always have a vertical scrollbar included.</p>
  
  <p>I'm not too familiar with Python or Qt, but from what I can see in the code, scrollbars should always be disabled:</p>
  
  <p>Starting at line 201:</p>
  
  <pre><code>self._page.mainFrame().setScrollBarPolicy(Qt.Horizontal, Qt.ScrollBarAlwaysOff)
  self._page.mainFrame().setScrollBarPolicy(Qt.Vertical, Qt.ScrollBarAlwaysOff)
  self._page.settings().setUserStyleSheetUrl(QUrl("data:text/css,html,body{overflow-y:hidden !important;}"))
  </code></pre>
  
  <p>I'm finding it a bit hard to understand the relationship between the size of the X framebuffer created (via the -x option), the "geometry" of the virtual browser window (-g) and the -W (grab full window instead of frame) option. I've tried lots of combinations of these numbers with no success. I think this may have something to do with my problem, although the above code snippet would lead me to believe that scrollbars should NEVER be displayed.</p>
  
  <p>Here's the string of options that I'm using to take a screenshot of say, Facebook's login page:</p>
  
  <pre><code>webkit2png.py -g 1200 900 -x 1200 900 --aspect-ratio=ignore --scale=200 150 -o test.png http://www.facebook.com/
  </code></pre>
  
  <p>The output of this command produces a screenshot with a vertical scrollbar, which I don't want.</p>
  
  <p>Can anyone shed some light on this for me?</p>