    <style>
      @page {
          size: A4;
          margin: 0;
      }
      @media not print {
        #main {
          background-size: cover;
        }
      }
      html, body {
          margin: 0;
          width: 210mm;
          height: 297mm;
          font-size: 14px;
      }
      #main {
          height: 100%;
          width: 100%;
          position: relative;
          overflow: hidden;
      }
      .float {
          position: absolute;
          white-space: nowrap;
          height: 4.3mm;  /* default */
          /* overflow: hidden; */
          /* text-overflow: ellipsis; */
      }
      .multiline {
          white-space: pre !important;
      }
      @media (min-width: 10000px) { /* Set this to 1 px to show debug lines */
          #main { outline: 1px solid red; }
          .float { border: 1px solid black; }
      }
    </style>
    <script>
      const prune = () => {
        const { width, height } = document.body.getBoundingClientRect()

        for (const span of [...document.getElementsByClassName('float')]) {
          const { x, y } = span.getBoundingClientRect()

          if (x > width || y > height) {
            console.log('Removing span; it is not in the page', span)
            span.remove()
          }
        }
      }
    </script>
