title: Adding page border to HTML/PDF generation in Node/Puppeteer/Handlebars
body: <p>I am using Node and Puppeteer to generate a PDF that uses a handlebars template. All is working as expected.</p>
  <p>My only question is: how does one add border padding to the document, so that, if the document runs over multiple pages, the content doesn't go right up to the very edge of the page? Is there a style element I can use?</p>
  <p>See my handlebars template below:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;PDF Result Template&lt;/title&gt;
    &lt;style&gt;
      .container {
        margin: auto;
        padding: 30px;
        font-size: 13px;
        line-height: 13px;
        font-family: 'Helvetica Neue', 'Helvetica';
        color: #555;
      }
  
      .top-heading {
        margin-bottom: -20px;
        color: red;
      }
  
      .box {
        width: 100%;
      }
  
      .table-box {
        width: 100%;
        table-layout: fixed;
      }
  
      .left-box {
        float: left;
        min-width: 25%;
        max-width: 25%;
        margin-top: -20px;
      }
  
      .right-box {
        float: right;
        min-width: 75%;
        max-width: 75%;
      }
  
      .one-quarter {
        border: #ccc thin solid;
        max-width: 25%;
      }
  
      .half {
        border: #ccc thin solid;
        max-width: 50%;
      }
  
      .three-quarter {
        border: #ccc thin solid;
        min-width: 75%;
        max-width: 75%;
      }
  
      .full {
        border: #ccc thin solid;
        max-width: 100%;
      }
  
      .highlighted {
        font-weight: bold;
      }
  
      .flat-line {
        border: none;
        height: 1px;
        background-color: #ccc;
      }
  
      .header {
        clear: both;
        margin-top: 120px;
        text-align: center;
      }
  
      .centered {
        text-align: center;
      }
  
      .details-cell {
        padding: 0 8px;
      }
  
      .notes-table {
        margin-top: 20px;
        min-width: 100%;
      }
  
      .goal-heading {
        font-weight: bold;
        text-align: center;
      }
  
      .signature {
        margin-top: 10px;
        min-width: 100px;
        max-width: 100px;
        height: auto;
        position: relative;
        float: right;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="container"&gt;
      &lt;table&gt;
        // Other code
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>