The bigger problem is the concept of the vertical location on the page which is maintained in variable v_y. This bit of code shown below in cursor2table is assuming the column headers are a single line. You would need to figure out how to advance v_y based on the maximum number of lines in any of the column headers values. It is also nasty because we go down in value of v_y as we go down the page, so you subtract instead of add. It can be very confusing. I did a lot of drawing on a scrap of paper and putting in values.
IF v_page_count = 0 OR v_y < as_pdf3.get(as_pdf3.c_get_margin_bottom)
THEN -- either nothing done yet or already wrote a full page and need to start a new one
as_pdf3.new_page;
v_page_count := as_pdf3.get(as_pdf3.c_get_page_count);
v_y := y_top_margin - v_lineheight;
END IF;
show_header;
It is more than I want to do, but I would support you if you want to add it. I'm starting a new job next week, so I'm not going to have much time for a while. Good luck with it.