• Resolved divadyx

    (@divadyx)


    Hello, is it possible to add to the invoice number of page? For example, if I have an invoice with 2 pages, it will show number 1 on first page and number 2 on the second.

    I could not find it in the settings, maybe I can do it with some hook?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @divadyx,

    This can be achieved in two different ways:

    1. With a custom block, using the customizer included in Premium Templates, this way:A screenshot that displays a custom block with the page numbering setup

    2. With some PHP code, with a code snippet like this:

    /**
     * WooCommerce PDF Invoices & Packing Slips:
     * Add a page numbering on the invoices
     */
    add_action( 'wpo_wcpdf_before_document', function ( $document_type, $order ) {
    	if( $document_type == 'invoice' ) {
    		echo '<div style="position:fixed; left:0; bottom:-1cm; height: 1cm; width:100%">Page {{PAGE_NUM}} of {{PAGE_COUNT}}</div>';
    	}
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Please note that repeating the headers & footers, and adding a page numbering to your documents, doesn’t work if you also want to print the invoices in bulk from the order list, as the footers of multiple invoices will stack on top of each other. This can be solved using the Bulk export feature included in the Professional extension, since it separates the PDF documents in single files.

Viewing 1 replies (of 1 total)
  • The topic ‘Number of page of invoice’ is closed to new replies.