title: Can We use page breaks in for loops?
body: <p>I wanted to print barcodes using for loop in python. This is my code:</p>
  
  <pre><code>`{%- from "templates/print_formats/standard_macros.html" import add_header -%}
  
  &lt;hr&gt;
  
  {% set a = doc.end %}
  {% set count = 0 %}
  &lt;div class="row"&gt;
  {%- for i in range(doc.start,doc.end) -%}
  
  &lt;div class="col-md-4 text-center"&gt;
  &lt;p style="font-family: Code39AzaleaFont;font-weight: normal;font-style: normal;font-size:30px;"&gt;
  00000000000000{{ i }}&lt;/p&gt;
  {% set count = count + 1 %}
  {{count}}
  
  &lt;br/&gt;
  &lt;/div&gt;
  
  {%- endfor -%}
  &lt;/div&gt;
      &lt;hr&gt;
      &lt;br&gt;
      &lt;p class="strong"&gt;
  
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          {{ _("Authorized Signatory") }}
      &lt;/p&gt;
  &lt;/div&gt;`
  </code></pre>
  
  <p>The problem is,I wanted to restrict the number of barcodes printed on one sheet of paper to 24.Is there any way to do that?</p>