title: How to convert webpage into PDF by using Python
body: <p>I was finding solution to print webpage into local file PDF, using Python. one of the good solution is to use Qt, found here, <a href="https://bharatikunal.wordpress.com/2010/01/" rel="noreferrer">https://bharatikunal.wordpress.com/2010/01/</a>.</p>
  
  <p>It didn't work at the beginning as I had problem with the installation of PyQt4 because it gave error messages such as '<code>ImportError: No module named PyQt4.QtCore</code>', and '<code>ImportError: No module named PyQt4.QtCore</code>'.</p>
  
  <p>It was because PyQt4's not installed properly. 
  I used to have the libraries located at C:\Python27\Lib however it's not for PyQt4. </p>
  
  <p>In fact, it simply needs to download from <a href="http://www.riverbankcomputing.com/software/pyqt/download" rel="noreferrer">http://www.riverbankcomputing.com/software/pyqt/download</a> (mind the correct Python version you are using), and install it to C:\Python27 (my case). That's it.</p>
  
  <p>Now the scripts runs fine so I want to share it. for more options in using Qprinter, please refer to <a href="http://qt-project.org/doc/qt-4.8/qprinter.html#Orientation-enum" rel="noreferrer">http://qt-project.org/doc/qt-4.8/qprinter.html#Orientation-enum</a>.</p>