Topic: Page numbering on sales invoice PDF's

Is it possible to add page numbering to sales invoices PDF's ? Many of my invoices exptend to 6 pages and I then need to process them using Adobe Acrobat to add page numbers "1 of n" (Bates numbering), if the FA PDF generator could add page numbers automatically it would simplify this process for me.

Re: Page numbering on sales invoice PDF's

You can comment out line 142 in reporting/includes/header2.inc, then you will have page numbering on all  reports.
Janusz

Re: Page numbering on sales invoice PDF's

Brilliant, maybe that should be an option in the config file ;-)

/Elax

Re: Page numbering on sales invoice PDF's

Wiki-ed it.

Re: Page numbering on sales invoice PDF's

Thanks Janusz, that works perfectly.

Date              31.08.2013
Invoice No.    37754         Page 6


Hi to Elax, the TextCart extension is working perfectly also.

Cheers
Andrew

Re: Page numbering on sales invoice PDF's

andrew1136 wrote:

Hi to Elax, the TextCart extension is working perfectly also.

Great :-) !

Re: Page numbering on sales invoice PDF's

If page numbering starting from second page is acceptable for you (i.e. without page number on first page), we can switch the numbering on for all documents since next minor release.
Janusz

Re: Page numbering on sales invoice PDF's

Yes that would be acceptable.

Re: Page numbering on sales invoice PDF's

if i select multiple invoices for printing (like invoice no 1 to 1000, all single page invoices) the PDF which is generated also includes pagenumbering. By example invoice no 2 gets pagenumber 2. I think this is incorrect and the numbering as discussed in this thread should restart on each invoice again and not on the pages when bulk printing invoices.

Re: Page numbering on sales invoice PDF's

erwindebruin wrote:

if i select multiple invoices for printing (like invoice no 1 to 1000, all single page invoices) the PDF which is generated also includes pagenumbering. By example invoice no 2 gets pagenumber 2. I think this is incorrect and the numbering as discussed in this thread should restart on each invoice again and not on the pages when bulk printing invoices.

Any solution to this situation? Appreciate anyone's help

Re: Page numbering on sales invoice PDF's

Just remove the page number for now or keep resetting the page number in the report when a new invoice is generated.

Re: Page numbering on sales invoice PDF's

Hi Guys,

How do we display page number like "page 1 of 3"?

What's name of the function to be called? Is the following syntax correct?

$this->Text($mcol + 180, _("Page") . ' ' . $this->pageNumber . _(" of ") . $this->totalPageNumber);

Thank you for your time.
Eric

Last edited by ericta (12/30/2016 05:40:34 pm)

Re: Page numbering on sales invoice PDF's

Either you use your own page counter variable in the report file and increment it just before each AddPage() (or FA's NewPage()) or use TCPDF's (reporting/includes/tcpdf.php) page variables ($page is the class property for the current page number, $pages is an array of the pdf pages) that the FA reporting engine uses.

Whilst $this->pageNumber is correct, the $this->totalPageNumber is not used in FA.

As the pdf generation progresses, the max number of pages in the document till then is $this->getAliasNbPages().

Last edited by apmuthu (01/01/2017 05:58:07 pm)