Write more items of DynaPDF in another page, how?

Hi all!

How can I put a limit on the page for only write items until the text I have written, and then continues writing a new page.(on DynaPDF Table example)

Example:

In a database I have a record of an invoice with 40 items, in the fist page must be fit 6 items, and the rest of items wants to be in a new page and so on.
Is there a way to do this?

Regards.

I think I can adapt the code of “DynaPDF Table from Listbox” to my project to do this.

I saw that there’s a button where says “Try with 1000 rows” and continues writing on subsequent new pages as I want.

But instead of a Listbox I gonna use my recordset

you build the table in memory and than loop and see how many rows fit on a page. Than in your loop you add more pages and draw rows until you are done. Our examples do it this way.

Yeah, It works. Now I’m trying to write the format of the invoice as many pages are created,

I think its after call pdf.append

Example:
do
Call table.DrawTable( 25.0, 168.0,420.00)
// draw footer
if table.HaveMore then
call pdf.EndPage
call pdf.Append

  call pdf.WriteText(180.0, 681.5,"TEST TEXT")
  
   
else
  // done
  exit
end if

loop
table = nil

But Nothing happens, I thought to write a simple text for each page created. If this works, then I’ll replace this with all the Invoice pattern.

What Am I doing wrong?

I Test it but It says “No Active font”

Ok I solve it :stuck_out_tongue: :stuck_out_tongue:

how?
normally you set all cells in table to have a default font after creating table.

[quote=204219:@Christian Schmitz]how?
normally you set all cells in table to have a default font after creating table.[/quote]
I used call pdf.setfont before Write text and Voila

Now I have a new doubt, How can I get the number of pages of the PDF? In order to Write the DEMO String for each page created

Thanks

pdf.GetPageCount

Thanks