Getting metrics from HTML rendering for dynamic table page breaks

17 views
Skip to first unread message

Kenneth Porter

unread,
Apr 23, 2024, 12:04:45 PMApr 23
to wxWidgets Users
I want to print some database tables and the wxHtmlPrintout class looks
like a promising way to achieve that. I think I want to render the DB
table as a sequence of HTML tables, one per paper page, similar to the
way a conventional reporting package works.

To accomplish that, I need to know how many DB rows fit on a page. Is
there some straightforward way to do that? I'm thinking I could
dummy-render an HTML table with one and two rows to measure the minimum
size of the table and how much it will grow with each row added. With
that and the page size, I can calculate how many rows will fit on each page.

I'm trying to figure out how to hook the rendering process so that I can
do this measurement and dynamically generate the HTML on the fly.

Any hints would be welcome.


Reply all
Reply to author
Forward
0 new messages