Page Break Functionalty

I have created a Custom Print from Print Format for Quotation Module.While setting page break for items it is showing in two pages for Standard Format only.But in Custom Print it is not showing in two pages.Is any code specifically write for this ?

< div class=“Page-Break” ></ div>

But take a Look at standard.html you can try to adoptz

Dear Daniel,thanks for your reply.When I am selecting “Page-Break” option for a particular item in the itemlist in quotation , it is not showing in next page for custom printing.But in standard template it is showing in next page.I wrote ‘< div class=“Page-Break” ></ div>’ code.But this is also not working.

Hi Guys,

I have had the same issue some time ago.

Please use the below html and you will be fine.

< p style=“page-break-after:always;”>

If you have any better solution, it will be great to know it

The best solution is to edit “standard.html” from the menu :wink: it will be and work like a charm.

{%- from "templates/print_formats/standard_macros.html" import add_header2, add_header,
         render_field, add_letterhead, add_foot -%}

{% for page in layout %}
 
<div class="page-break">
    <div style="margin:1.5cm;"><br><br><br>   
		
		<img alt="TESTING" src="/templates/print_formats/barcode.php?text={{ doc.name }}%20in%20{{ doc.doctype }}&orientation=vertical&size=40" />
		
		<br><br><br><br><br> {{ add_header2(doc)}}
  
    {% for section in page %}
    <div class="row">
        {% for column in section %}
        <div class="col-xs-{{ (12 / section|len)|int }}">
            {% for df in column %}
                {{ render_field(df, doc) }}
            {% endfor %}
        </div>

        {% endfor %}
    </div>

    {% endfor %}
    

{{ add_header(loop.index, layout|len, doc) }}
   
</div>
</div>

{% endfor %}

{%- if trigger_print -%}
<script>
window.print();
window.close();
</script>
{%- endif -%}
2 Likes

Thanks Daniel… :smile:

You’re welcome :smile:

Think we can close this!

Dan

Yes .It is working Thanks .