title: mPDF position absolute
body: <p>I need to generate PDF file from HTML input:</p>
  
  <pre><code>&lt;div style="width: 14cm; height: 21cm; position: relative"&gt;
    &lt;img src="bg-image.jpg" style="width: 100%; height: 100%; position: absolute; left: 0; top: 0"&gt;
    &lt;img src="image.jpg" style="width: 100px; height: 100px; position: absolute; left: 5cm; top: 5cm"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>where first image is background and second image is user input (smaller photo).</p>
  
  <p>Problem is that when I try to generate in to PDF file with mPDF library, images are not displayed on one page, but one image is on first page, second image is on second page. So I think that absolute positioning does not work and I do not know how to fix it. I can not use first image as background image because its natural dimensions are smaller than background area it have to fill.</p>
  
  <p>Can you give me some advice, please? What is wrong?</p>