title: How to install pdfkit (python module) in windows 10?
body: <p>I install pdfkit using pip (<code>pip install pdfkit</code>).</p>
  <p>Then i install wkhtmltopdf from <a href="https://wkhtmltopdf.org/downloads.html" rel="nofollow noreferrer">here</a></p>
  <p>But when i try to run the following code:</p>
  <pre><code>import pdfkit
  
  config = pdfkit.configuration(wkhtmltopdf='C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe')
  pdfkit.from_url('https://www.google.com', 'C:\\Users\\Χρήστος\\Desktop\\out-test.pdf', configuration=config)
  </code></pre>
  <p>An error oqqurs:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;create_pdf.py&quot;, line 4, in &lt;module&gt;
      pdfkit.from_url('https://www.google.com', 'C:\\Users\\Χρήστος\\Desktop\\out-test.pdf', configuration=config)
    File &quot;C:\Users\Χρήστος\AppData\Local\Programs\Python\Python38\lib\site-packages\pdfkit\api.py&quot;, line 26, in from_url
      return r.to_pdf(output_path)
    File &quot;C:\Users\Χρήστος\AppData\Local\Programs\Python\Python38\lib\site-packages\pdfkit\pdfkit.py&quot;, line 156, in to_pdf
      raise IOError('wkhtmltopdf reported an error:\n' + stderr)
  OSError: wkhtmltopdf reported an error:
  Loading pages (1/6)
  QPainter::begin(): Returned false============================] 100%
  Error: Unable to write to destination
  Exit with code 1, due to unknown error.
  </code></pre>
  <p>Any advice would be useful.</p>
  <p>I also run the code with administration priviledges.</p>
  <p><strong>Edit:</strong> From wkhtmltopdf site:</p>
  <blockquote>
  <p>How do I use it? Download a precompiled binary or build from source
  Create your HTML document that you want to turn into a PDF (or image)
  Run your HTML document through the tool. For example, if I really like
  the treatment Google has done to their logo today and want to capture
  it forever as a PDF:</p>
  <p>wkhtmltopdf <a href="http://google.com" rel="nofollow noreferrer">http://google.com</a> google.pdf</p>
  </blockquote>
  <p>So i tried this:</p>
  <pre><code>cd C:\Program Files\wkhtmltopdf\bin
  wkhtmltopdf http://google.com google.pdf
  </code></pre>
  <p>Didn't work, but when I run it with admininstration priviledges the pdf was make.
  So the pdfkit module must open wkhtmltopdf with admin priviledges.</p>