FPDI, how to remove automatic page counter
I'm using FPDI together with TCPDF to add a page to a already existing PDF-file. This works great, but I have one problem. When I output the new PDF I get an automatic page counter in the lower right corner, "112/299" for example. I find no documentation in FPDI or TCPDF about thi开发者_StackOverflow中文版s automaticly generated page counter.
This problem only occurs when I put the file through FPDI, which narrows it down to FPDI I suppose.
My question is: How do I remove this god awful page counter in the bottom right corner of every page in my FPDI-generated PDF-file.
Thankful for answers.
I solved it, finally. The thing was, TCPDF puts default headers and footers on every page it generates, you can disable this with;
$object->setPrintHeader(false);
$object->setPrintFooter(false);
The thing was, I use FPDI to concatenate two PDF-files into one. To do this, you have to iterate over every page in both of the files you want to put together, and then finally add all these pages to a new PDF-file and output it.
So the solution was disabling the header and footer in every page sent to the new PDF-file, in the object it self who iterates over this. Just use;
$this->setPrintHeader(false);
$this->setPrintFooter(false);
If you're using PHP of course, otherwise you'll figure it out!
精彩评论