title: Generate PDF with WeasyPrint having common header/footer and pagination
body: <p>I am using WeasyPrint to generate PDF in Django. I can generate pdf from a static html file like below -</p>
  
  <pre><code>from django.template import Context, Template
  import weasyprint
  
  with open('static_file.html', 'r') as myfile:
      html_str = myfile.read()
  
  template = Template(html_message)
      context = Context({'some_key': 'some_value'})
      rendered_str = template.render(context)
  
  weasyprint.HTML(string=rendered_str).write_pdf('generated.pdf')
  </code></pre>
  
  <p>But I want to generate a PDF in which, I can include a common header/footer in each page and add pagination.</p>
  
  <p>Also it will be very helpful if anyone can tell how to include a custom font to generate the PDF. I have installed the font in the OS (Ubuntu 14.04) but it is not working.</p>
  
  <p>I have searched a lot on the web about these. But could not find a proper solution.</p>