0

I have one specific problem in PDF. My requirement is that i have to print page number in header of the page only when total page of pdf is greater than 1.

I think this is not possible because before completing whole pdf page we can get total page number.

I think you have any idea to apply my condition in TCPDF.

I have tried all function related page number nothing working.

Thanks In Advance.

Bhavin Thummar
  • 1,255
  • 1
  • 12
  • 29
  • I'm not sure, but you can try with this example: https://tcpdf.org/examples/example_003/ – Khoa TruongDinh Aug 14 '18 at 06:49
  • @KhoaTruongDinh I have already applied that thing but this is not solution for my specific problem. – Bhavin Thummar Aug 14 '18 at 06:58
  • Yes it is :) https://stackoverflow.com/questions/9977594/how-to-get-total-no-of-pages-in-tcpdf#12834377 – Richard Aug 14 '18 at 09:49
  • @Richard. This is already i have checked but according this question link, my problem is not solve. I have really upset i think i have checked all thing in stack overflow and other website for this. Please anyone have same issue then tell me i want solution of this problem. I have tried to found solution last one week but i don't get any solution. – Bhavin Thummar Aug 15 '18 at 05:14
  • This should do the job: if ($this->getAliasNbPages() > 1) { echo $this->getAliasNumPage(); } – Richard Aug 15 '18 at 07:44
  • @Richard I have got the return value from this function is "{:ptp:}" on all page of the pdf. So we can say that this is short code which is execute after end of the PDF. For this i have already asked one question on stack overflow already. You can check it out here. https://stackoverflow.com/questions/51761325/in-tcpdf-this-getaliasnbpages-return-value-ptp-so-how-can-i-get-integer – Bhavin Thummar Aug 15 '18 at 07:53

0 Answers0