title: How to display a print preview of an HTML document
body: <p>I need to display some HTML content as it will be printed. Basically, I want to emulate the browser print preview feature. </p>
  
  <p>I'm not sure how to do this just with HTML/CSS/JavaScript. The only solution I came up is to convert the HTML to PDF so it´s split into pages and then convert that PDF to images and print each image one bellow the other.</p>
  
  <p>It will be really helpfull if someone can point a more straight forward method. I'm not even sure if this is posibble.</p>
  
  <p>BTW, I'm using PHP in the backend, so if there is a PHP class for this it will be helpfull.</p>
  
  <p>The page size for diplaying it will be letter no matter what the user have configured</p>
  
  <p>This how it should look in the browser:
  <img src="https://imgur.com/ynoXq.jpg" alt="alt text"></p>