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!
![]() |
Tables in PDF spanning several pages |
Post Reply ![]() |
Author | |
stakon ![]() Team Player ![]() Joined: 09 Oct 09 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() Posted: 16 Sep 10 at 10:57AM |
Hi all,
I have some really lengthy tables i want to put in a PDF. The documentation on tables notes that DrawTableRows will only draw as much of a table as it fits in the current page. Is there any alternative? Some function that continues drawing my table across several pages? If not, is there any trick some of you have used to make this happen? Thanx in advance, stakon. |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi Stakon,
Sure, you can draw a table across multiple pages using DrawTableRows. When you call the DrawTableRows function there is a 'Height' parameter that will determine the area in which table rows can be drawn. If the rows being drawn exceed that area, then the DrawTableRows function will return the number of the last drawn row. This information can be used as a starting point for drawing the next row on the second page. When you call this function you don't have to start at row 1, you can start at row 101 if you want. Your table will still be in memory after DrawTableRows finishes on the first page. SelectPage(1) DrawTableRows SelectPage(2) DrawTableRows SelectPage(3) DrawTableRows You just keep doing this until you haven't got any more rows in your table to draw. Cheers, - Rowan.
|
|
![]() |
|
pdfOakleaf ![]() Beginner ![]() Joined: 24 Oct 10 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
sorry if this is a daft question but I've only just started with this library
SelectPage(1) DrawTableRows how do you know which rows have been drawn and which are still to be rendered? Many thanks Phil |
|
![]() |
|
pdfOakleaf ![]() Beginner ![]() Joined: 24 Oct 10 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
Or is it just a case that I just have to work out how many rows will fit on the first page, render them,
then add a new page and continue the rendering until I reach the end of the table. I'm quite happy to do that unless there's an elegant solution. Thanks Again (great product by the way) Phil |
|
![]() |
|
pdfOakleaf ![]() Beginner ![]() Joined: 24 Oct 10 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
having read the documentation for DrawTableRows more thoroughly I have worked this out
It's a very impressive libary. Phil (next time I'll read more and post less) |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Great -- I'm glad to hear that you were able to resolve the issue. Thanks for keeping us updated.
Cheers, - Rowan. |
|
![]() |
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