title: Django easy_pdf remove margin
body: <p>To create pdf from html i use <a href="https://django-easy-pdf.readthedocs.io/en/latest/api.html" rel="nofollow noreferrer"><code>easy_pdf</code></a> with is connected to <a href="http://fwpn.org.pl/assets/event_attachments/asd.html" rel="nofollow noreferrer">xhtml2pdf</a>.</p>
  
  <p>Small example:</p>
  
  <p>in view.py</p>
  
  <pre><code>from easy_pdf.rendering import render_to_pdf_response
  
  context = dict({'user_company': 'test'})
  template_name = "pdf_template.html"
  return render_to_pdf_response(request, template_name, context)
  </code></pre>
  
  <p>html template:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  {% load static %}
  
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;style&gt;
          * {
              margin: 0 !important;
              padding: 0 !important;
            }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      {{user_company}}
      &lt;img src="/static/some_image.png" height="1000" width="1000"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Image and all element are placed inside margins:</p>
  
  <p><a href="https://i.stack.imgur.com/C2MSU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C2MSU.jpg" alt="enter image description here"></a></p>
  
  <p>I have try to change and add some margins options inside <code>side_packages/easy_pdf/templates/easy_pdf/base.html</code> : <a href="https://github.com/nigma/django-easy-pdf/blob/master/easy_pdf/templates/easy_pdf/base.html" rel="nofollow noreferrer">github link</a></p>
  
  <pre><code>        &lt;style type="text/css"&gt;
              @page {
  
                  // added
                  margin: 0 !important;
  
                  * {
                      margin: 0 !important;
                      padding: 0 !important;
                  }
  
                  body {
                     margin: 0 !important;
                     padding: 0 !important;
                  }
  
  
                  @frame {
                     margin: 0 !important;
                  }
  
                  // changed
                  size: {{ pagesize|default:"A4" }};
                  margin-left: 0;
                  margin-right: 0;
                  margin-top: 0;
                  margin-bottom: 0;
  
                  @frame header {
                      -pdf-frame-content: page-header;
                      margin-top: 0;
                      margin-right: 0;
                      margin-bottom: 0;
                      margin-left: 0;
                  }
  
                  @frame footer {
                      -pdf-frame-content: page-footer;
                      bottom: 0;
                      margin-left: 0;
                      margin-right: 0;
                      height: 0;
                  }
              }
          &lt;/style&gt;
  </code></pre>
  
  <p>But without effect</p>
  
  <p><b>Question</b></p>
  
  <p>Where to add or change css options to remove the margins from pdf?</p>