Page break for the Quote tempalate on PDFManager

Michael Shaheen Matt Marum

Hi, I would like to send a page break in the Quote Template to start a new page. The Terms and Conditions (fine print) needs to print on a separate page. 

Platform is On Demand, Ultimate.

Parents
  • You need to:

    • create a custom Sugarpdf for Quotes
    • create a  PDF Template containing the Terms and Conditions
    • edit the method display at custom Sugarpdf this way:

    public function display()
    {
    parent::display();

    $lastPageTemplate = $this->bean->db->getConnection()->fetchColumn(
    "SELECT body_html FROM pdfmanager
    WHERE deleted = 0 AND name = CONCAT((SELECT name FROM pdfmanager WHERE id = ?), ' - LAST_PAGE')",
    [$_REQUEST['pdf_template_id']]
    );

    if(!empty($lastPageTemplate)){
    $this->AddPage();
    $this->writeHTML($lastPageTemplate, $this->smartyLn, $this->smartyFill, $this->smartyReseth, $this->smartyCell, $this->smartyAlign);
    }
    }

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • You need to:

    • create a custom Sugarpdf for Quotes
    • create a  PDF Template containing the Terms and Conditions
    • edit the method display at custom Sugarpdf this way:

    public function display()
    {
    parent::display();

    $lastPageTemplate = $this->bean->db->getConnection()->fetchColumn(
    "SELECT body_html FROM pdfmanager
    WHERE deleted = 0 AND name = CONCAT((SELECT name FROM pdfmanager WHERE id = ?), ' - LAST_PAGE')",
    [$_REQUEST['pdf_template_id']]
    );

    if(!empty($lastPageTemplate)){
    $this->AddPage();
    $this->writeHTML($lastPageTemplate, $this->smartyLn, $this->smartyFill, $this->smartyReseth, $this->smartyCell, $this->smartyAlign);
    }
    }

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children