Answers.Body: <p>I figured it out on my own.
  To print <code>&lt;div&gt;</code> on different pages, it needs to be positioned relative.</p>
  
  <p>So, I ended up putting all the existing <code>&lt;div&gt;</code> with position absolute into a <code>&lt;div&gt;</code> with position relative.</p>
  
  <p>However, that is not sufficient enough, I also needed to fill in a simple <code>&lt;br /&gt;</code> tag as well.</p>
  
  <p>This worked:</p>
  
  <p><code>&lt;div id="page" style="position: relative;"&gt;</code></p>
  
  <p><code>&lt;br /&gt;</code></p>
  
  <p><code>&lt;div id="content" style="position: absolute;"&gt;</code></p>
  
  <p><code>&lt;/div&gt;</code></p>
  
  <p><code>&lt;/div&gt;</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-27T10:21:35.970Z
Answers.LastActivityDate: 2015-03-27T10:21:35.970Z
Answers.UserDisplayName: Flying
Body: <p>I have made a html-template in CiviCRM consisting only of this kind of html tag:
  &lt;div style="position: absolute;"&gt;</p>
  
  <p>This works perfect for selecting a template for pdf printing, when printing only one page. Then I have the opportunity to place certain elements at the appropriate place on my letter.</p>
  
  <p>The problem arises, when selecting a bunch of contacts, and then creating pdf-s to all of them at the same time. Then it only prints all on one single pdf-page, instead of one page pr. contact. I want the CiviCRM-template to print the &lt;div&gt; tag on one page pr. contact.</p>
  
  <p>Is there a trick here I don't know? And if so, please explain...</p>
  
  <p>(My site is using wkhtmltopdf to generate the pdf-s)</p>
  
Tags: <templates><pdf><html>
Title: Using <div> tag for pdf printing
ThreadText: # Using <div> tag for pdf printing
  
  (Asked by: username_0 on 2015-03-27)
  
  I have made a html-template in CiviCRM consisting only of this kind of html tag:
  <div style="position: absolute;">
  
  This works perfect for selecting a template for pdf printing, when printing only one page. Then I have the opportunity to place certain elements at the appropriate place on my letter.
  
  The problem arises, when selecting a bunch of contacts, and then creating pdf-s to all of them at the same time. Then it only prints all on one single pdf-page, instead of one page pr. contact. I want the CiviCRM-template to print the <div> tag on one page pr. contact.
  
  Is there a trick here I don't know? And if so, please explain...
  
  (My site is using wkhtmltopdf to generate the pdf-s)
  
  **Tags:** templates, pdf, html
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-03-27. Score: 3 | Accepted answer
  
  I figured it out on my own.
  To print `<div>` on different pages, it needs to be positioned relative.
  
  So, I ended up putting all the existing `<div>` with position absolute into a `<div>` with position relative.
  
  However, that is not sufficient enough, I also needed to fill in a simple `<br />` tag as well.
  
  This worked:
  
  `<div id="page" style="position: relative;">`
  
  `<br />`
  
  `<div id="content" style="position: absolute;">`
  
  `</div>`
  
  `</div>`
  
  
  ---
  
  