How to get a page count in PDF quote or PDF invoice?

Hi guys,
how can I get a page count in quote template?
I wanna show on the footer a progressive number from 01.

Thaks :slight_smile:

Haven’t got time to give you a full reply right now, but this will point you in the right direction :blush:

https://community2.invoiceplane.com/t/topic/4764/10?u=nmay1990

thank you @nmay1990 i change pdf_invoice_footer to pdf_quote_footer but i still can’t see the numbers.
Do I need to change anything in settings?

EDIT:
ok, i found the solution :slight_smile:

to add numbers to invoice and quotation

You just need to edit the file, line 79:

application/helpers/mpdf_helper.php

// Set the footer if voucher is invoice and if set in settings
    if (!empty($CI->mdl_settings->settings['pdf_invoice_footer'])) {
        $mpdf->setAutoBottomMargin = 'stretch';
        $mpdf->nbpgPrefix = ' of ';
        $mpdf->SetHTMLFooter('<div id="footer">' . $CI->mdl_settings->settings['pdf_invoice_footer'] . '</div>' . '<p align=right>Page {PAGENO}{nbpg}</p>');
        
    }

    // Set the footer if voucher is quote and if set in settings
    if (!empty($CI->mdl_settings->settings['pdf_quote_footer']) && strpos($filename, trans('quote')) !== false) {
        $mpdf->setAutoBottomMargin = 'stretch';
         $mpdf->nbpgPrefix = ' of ';
        $mpdf->SetHTMLFooter('<div id="footer">' . $CI->mdl_settings->settings['pdf_quote_footer'] . '</div>' . '<p align=right>Page {PAGENO}{nbpg}</p>');
    }
1 Like

Sorry didn’t have time to give you the full reply last night…glad you’ve sorted it though! :blush: