title: Why [tag:weasyprint] xhtml-to-pdf does not fit A4 page?
body: <p>I try to convert an "xhtml web page" to an "A4 portrait pdf" with weasyprint Python 3 API.
  <a href="https://educadhoc.hachette-livre.fr/extract/complet/9782401058705/show-page/page325.xhtml" rel="nofollow noreferrer">Here</a>  is the page.<br>
  But the pdf file, at the end, does not fit A4 page.<br>
  Here is the python code :</p>
  
  <pre><code>#!/usr/bin/python3
  
  from weasyprint import HTML, CSS
  import subprocess
  
  Page = HTML(url="https://educadhoc.hachette-livre.fr/extract/complet/9782401058705/show-page/page325.xhtml")
  Style = CSS(string='''
      @page {
          size: A4 portrait;
          max-height:100%;
          max-width:100%;
          }
  ''')
  Page.write_pdf(target="Try.pdf", zoom=1, stylesheets=[Style])
  subprocess.Popen(["evince", "Try.pdf"])
  </code></pre>
  
  <p>It does not fit A4 even with "size A4 portrait" in CSS style and "zoom=1" in write_pdf method!<br>
  (There is also lines shifts in the pdf file ! ...)<br>
  What do you suggest ?</p>