title: Print rdlc on thermal printer with unknown height
body: <p>How can I use RDLC Reports to print a receipt with variable height? The height needs to be the sum of all elements inside the report. My report can grow and shrink in size.</p>
  
  <p>My device info xml used inside the export method:</p>
  
  <pre><code>&lt;DeviceInfo&gt;
              &lt;OutputFormat&gt;EMF&lt;/OutputFormat&gt;
              &lt;PageWidth&gt;6.5cm&lt;/PageWidth&gt;
              &lt;PageHeight&gt;10cm&lt;/PageHeight&gt;
              &lt;MarginTop&gt;0cm&lt;/MarginTop&gt;
              &lt;MarginLeft&gt;0cm&lt;/MarginLeft&gt;
              &lt;MarginRight&gt;0cm&lt;/MarginRight&gt;
              &lt;MarginBottom&gt;0cm&lt;/MarginBottom&gt;
  &lt;/DeviceInfo&gt;
  </code></pre>
  
  <p>I've tried to sum the height of each item and set PageHeight to it but this doesn't work.</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/ms252091.aspx" rel="nofollow noreferrer">Here</a> is a MSDN page where we can find a complete example.</p>