Conditional Application of {{pagebreak}} in PDF Templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Triggerz
    Senior Member
    • May 2024
    • 134

    #1

    Conditional Application of {{pagebreak}} in PDF Templates

    Hi,

    Is there a way to conditionally apply {{pagebreak}} in PDF Templates? I am looking for a way to calculate remaining space on the page before applying the {{pagebreak}} code.

    I wanted to implement this on the Quotes PDF Template where number of products in the quote can vary between 1 to 500.

    Thanks in advance
  • heint
    Member
    • Jun 2025
    • 61

    #2
    Hi Triggerz,

    Whenever you are iterating through the itemList of any entity, it will use "table" markup, and as far as I know, you cannot build proper logic around it by using {{pagebreak}} inside of it. Additionally, it's not possible to use outside "condition" logic (since it's a simple handlebars functionality), which possibly would help you to track when to post the {{pagebreak}}.

    Potentially you can implement your own customization through the code, but I really don't know where to point you here.

    Maybe this link will help: https://docs.espocrm.com/user-guide/...custom-helpers, but as I said, it's a developer's configuration.

    Comment

    Working...