I have several hundred records I would like to generate into a multipage pdf. I can get the code to work which generates a static page, but I am unable to repeat the process in a loop to keep the text flowing to the next page and so on.
This code will generate a static page with no problems. To make this list items down the pdf do I need to just repeat the pdf_show_xy($pdf, "(Test,",50, 750); in a while loop or is thier more to this.
$pdf = pdf_new();
pdf_open_file($pdf, "gn_test_pdf.pdf");
pdf_begin_page($pdf, 595, 842);
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);
pdf_show_xy($pdf, "Test,",50, 750);
pdf_end_page($pdf);
pdf_close($pdf);