Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Get what the rendered height of table row? |
Post Reply |
Author | |
bpeikes
Beginner Joined: 23 Apr 18 Status: Offline Points: 11 |
Post Options
Thanks(0)
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.
|
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store