Quote Custom template break page

fgoverna
Member

Hi

I would like to insert a break page in a custom template.
With the red arrow I show the point.
So that when I generate the pdf of the quote, the Comments table starts on a new page.
And yes the table above has a dynamic height.
Thanks
Fbreakf.jpg

0 Upvotes
4 Replies 4
dennisedson
Community Manager

Hi @fgoverna 

Bringing @amandaulm into this conversation to see if she can lend a hand!

Thanks,

Dennis


We are excited to announce that the Community will be launching a weekly newsletter on November 2, 2020!
Sign up today!
0 Upvotes
amandaulm
Contributor

Thanks @dennisedson 

 

Hi @fgoverna - This isn't something I've personally worked with in our quote templates, but I think something like this should work, as the quote is just a webpage:  https://www.w3schools.com/cssref/pr_print_pageba.asp

 

I'd be interested to hear how it goes, if you do try it!

fgoverna
Member

Hi @amandaulm ,

Thanks for your suggestion!

I add this 2 in my quote template

In the header:

<style>
@media print {
   #break-page {page-break-after: always;}
}
</style>


After my table:

<div id="break-page"></div>

 

But the PDF generated is the same 😞

F

CSarzana
Member | Gold Partner


Hi @fgoverna, I just try to do the same and it seems that this style works only with elements and not with class.
I use for example "div {break-inside: avoid}" to avoid to have div splitted in pages and it works correctly.
Just try to wrap your divs inside a section and use: section {page-break-after: always}