title: WeaseyPrint Formats a PDF incorrectly
body: <p>I'm trying to create a PDF from a HTML file which I also want to pass variables into for a JINJA template to pick it up. At the moment I've been trying to use weasyprint to do so with:</p>
  
  <pre class="lang-py prettyprint-override"><code>from weasyprint import HTML, CSS
  
  css = CSS(string='@page { size: A3; margin: 0cm }')
  html = HTML('/home/templates/pdf_test.html')
  
  html.write_pdf('test.pdf', stylesheets=[css])
  
  </code></pre>
  
  <p>How would I then refactor this to send variables to the HTML so before the PDF is created? I'm using flask for my framework and the HTML contains JINJA templates.</p>