title: How can I remove the space between header and body in PDF report?
body: <p>I've customized my sales report to look from this:</p>
  
  <p><hr/>
  <img src="https://i.stack.imgur.com/PPdj7.png" alt="enter image description here"></p>
  
  <hr/>
  
  <p>To this:</p>
  
  <p><hr/>
  <img src="https://i.stack.imgur.com/Illq5.png" alt="enter image description here"></p>
  
  <hr/>
  
  <p>I commented the code section that shows the company information inside <code>external_layout_header</code> view:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;t t-name="report.external_layout_header"&gt;
      &lt;div class="header"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-xs-3"&gt;
                  &lt;img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/&gt;
              &lt;/div&gt;
              &lt;div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/&gt;
          &lt;/div&gt;
          &lt;div class="row zero_min_height"&gt;
              &lt;div class="col-xs-12"&gt;
                  &lt;div style="border-bottom: 1px solid black;"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;!-- COMMENTED
          &lt;div class="row"&gt;
              &lt;div class="col-xs-3"&gt;
                  &lt;div t-field="company.partner_id" t-field-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': true}" style="border-bottom: 1px solid black;"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  --&gt;
      &lt;/div&gt;
  &lt;/t&gt;
  </code></pre>
  
  <p>Somehow, I was expecting to reduce the space between the header and the report body. I've been trying out different ways with no luck. There's a similar <a href="https://www.odoo.com/forum/help-1/question/openerp-reports-how-to-reduce-space-between-company-header-and-text-body-63216" rel="noreferrer">question</a> in the Odoo forum but that's for v7 with RML (deprecated). I'm using Odoo v8 QWeb report.</p>
  
  <h2>Edit 1:</h2>
  
  <p>I already tried @Paulo's solution:</p>
  
  <p><hr/>
  <img src="https://i.stack.imgur.com/OCqnv.png" alt="enter image description here"></p>
  
  <hr/>
  
  <p>But this is not what I'm looking for. I need to gain space by moving the body near the header and not the other way around</p>
  
  <h2>Edit 2 (Solution):</h2>
  
  <p>As suggested by @Paulo's comment, playing around with the combination of fields <code>margin_top</code> and <code>header_spacing</code> did the trick. I reduced <code>margin_top</code> from <code>40</code> to <code>20</code> and <code>header_spacing</code> from <code>35</code> to <code>15</code>.</p>