Add page break to PDF template?

Is there a way to add a page break to a PDF template?
Parents
  • Hi,

    Short answer: 
    <br pagebreak="true"/>
    Longer answer:
    Sugar (7.x.x at least) uses TCPDF (http://www.tcpdf.org/) to generate its PDF's

    I couldn't get some CSS and HTML working in Sugar's version of TCPDF, so I updated ours to version 5.9.209, you can just replace the folder in "vendor/tcpdf".  FYI Sugar 7.2 ships with tcpd version 4.6 that was released in 2009, 5.9 was released is 2013, so this decade at least!

    However, I then found that the WYSIWIG editor could remove some of the HTML, so I built up the HTML/CSS in an editor and copied and pasted that straight into the database, which seems to work great now.  The database table is "pdfmanager"

    In other words, you might struggle to get the template to look decent in Sugar's current tcpdf version and WYSIWIG editor, including possibly the pagebreak (not sure if it works on old tcpdf).

    Hope this helps anyway,
    Jon
Reply
  • Hi,

    Short answer: 
    <br pagebreak="true"/>
    Longer answer:
    Sugar (7.x.x at least) uses TCPDF (http://www.tcpdf.org/) to generate its PDF's

    I couldn't get some CSS and HTML working in Sugar's version of TCPDF, so I updated ours to version 5.9.209, you can just replace the folder in "vendor/tcpdf".  FYI Sugar 7.2 ships with tcpd version 4.6 that was released in 2009, 5.9 was released is 2013, so this decade at least!

    However, I then found that the WYSIWIG editor could remove some of the HTML, so I built up the HTML/CSS in an editor and copied and pasted that straight into the database, which seems to work great now.  The database table is "pdfmanager"

    In other words, you might struggle to get the template to look decent in Sugar's current tcpdf version and WYSIWIG editor, including possibly the pagebreak (not sure if it works on old tcpdf).

    Hope this helps anyway,
    Jon
Children