Print Page | Close Window

Get what the rendered height of table row?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=4023
Printed Date: 23 Jul 24 at 3:59PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Get what the rendered height of table row?
Posted By: bpeikes
Subject: Get what the rendered height of table row?
Date Posted: 28 Aug 23 at 2:52PM
Is there a way to get what the rendered height of a call to DrawTableRows would be, without actually rendering to the page? What I'm trying to do, is detect if a row would fit on a page because the table functionality won't split a row across pages. i.e. if a row has a cell with 400 lines, the library will not render the row across pages.

In order to render a cell with enough text that it won't fit on a page, I would need to split the the row into multiple rows, and the only way to be able to do this, would be to know before hand how many rows of text are available for rendering.

Specifically, what I want to do is to "wrap" the text in each cell based on the cell width. Then, as I add rows, I need to know how tall the row would be when rendered. If a row can't render on the current page, I would try to split the row up. To split the row up, I would need to know how many lines of text will fit into the the next table row (including borders, etc). Using that information, I can tell how to split the text across multiple rows.



Replies:
Posted By: tfrost
Date Posted: 31 Aug 23 at 6:35PM
See my reply in your other topic. And from the DrawTableRows return value you can calculate the space left on the page to use for the first split of the next row, and pass this to DrawHTMLTextBox to find out where to split it.  All tedious work, but do-able.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk