title: How to Convert a Local HTML File to PDF File in Python
body: <p>I have searched some method to convert my local html files to pdf file in python.
  What I searched was <code>pdfkit</code>, <code>weasyprint</code>, <code>xhtml2pdf</code>, <code>pdfcrowd</code>.</p>
  <p>The problem is, I should make this as an exe file with Pyinstaller to give someone else so that they can work with this program. And I encountered an <code>OSerror</code> with <code>pdfkit</code> which is saying:</p>
  <pre><code>OSError: No wkhtmltopdf executable found: &quot;b''&quot;
  </code></pre>
  <p>And I found the solution that I have to edit some environment variables for that.
  Weasyprint also need to download/install other things.</p>
  <p>I don't think those will work in other PC since they need some external treatment to run the program.</p>
  <p><code>xhtml2pdf</code> seems be the one which convert html from the webpage(not the local file) to pdf, and <code>pdfcrowd</code> is my least option for now since I have to pay to use the API.</p>
  <p>Do you have any recommendations for converting those with my circumstances?</p>