Hi,

After creating a PDF document with FPDI, I'd like to write something on each page included in this document.
The problem is, before calling the Output function, the current page is the last one, and I have to write on previous pages.
Do you know if it's possible to come back to previous pages with FPDF/FPDI ?

I tried to use the SetY() function with a negative number (hoping the AcceptPageBreak could work in reverse mode) ; but it doesn't work. Anyway it would have been a bad way to solve this problem and I'm looking for a better solution.

Do you know if it's possible ?

Actually, what I want to write on the previous pages is the number of the page ; but I don't want to write : current_page/total_page (which I know is possible with pageNo() and AliasNbPages()). This document contains different documents (with variable pages number). So I need to write for example :
page 1/2 on the first PDF page
page 2/2 on the next one
page 1/3 on the next one
and so on

Any idea ?

thanks in advance !

    Thanks for your answer, but could you explain your idea please ? I don't understand how this function can help to solve my problem.

      Mine was just an idea. Produce your output, but buffer it, then read the bufer contents back in and reprocess them, then send to client.

        Write a Reply...