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!
DrawTableRows not able to write all the rows. |
Post Reply |
Author | |
MFuser
Beginner Joined: 28 Feb 20 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 28 Feb 20 at 9:06AM |
Hi,
I followed one of the example to write the table rows in the pdf When my rows are exceeding over 100 or say 400 rows the DrawTableRows is only able to write upto the 42 rows only even when I tired to increase the height. Here's is my sample code qp.SetPageSize("A4"); var numberofPropertiesasColumn = 5; var numberofFaxFecords = 400 + 1; // Create the table and specify the number of rows and columns var tableId = qp.CreateTable(numberofFaxFecords, numberofPropertiesasColumn); // Specify color and width of borders qp.SetTableBorderColor(tableId, 0, 0.3, 0.204, 0); qp.SetTableBorderWidth(tableId, 0, 0.2); // Specify table row height and table column width qp.SetTableRowHeight(tableId, 1, 5, 0); qp.SetTableColumnWidth(tableId, 1, 1, 50); qp.SetTableColumnWidth(tableId, 2, 2, 100); qp.SetTableColumnWidth(tableId, 3, 3, 200); qp.SetTableColumnWidth(tableId, 4, 5, 100); // Specify a background color for the column headers // QP.SetTableCellBackgroundColor(tableID, 1, 1, 1, 5, 0.3, 0.7, 1.0); qp.SetTableCellAlignment(tableId, 1, 1, 1, 5, 4); var rows = 1; qp.SetTableCellContent(tableId, rows, 1, "<b>TestID</b>"); qp.SetTableCellContent(tableId, rows, 2, "<b>Test FileName</b>"); qp.SetTableCellContent(tableId, rows, 3, "<b>TestJob</b>"); qp.SetTableCellContent(tableId, rows, 4, "<b>TestDate</b>"); qp.SetTableCellContent(tableId, rows, 5, "<b>TestRes</b>"); for (int i = 0; i < 400; i++) { rows++; qp.SetTableCellContent(tableId, rows, 1, "Value" + i.ToString()); qp.SetTableCellContent(tableId, rows, 2, "Value" + i.ToString()); qp.SetTableCellContent(tableId, rows, 3, "Value" + i.ToString()); qp.SetTableCellContent(tableId, rows, 4, "Value" + i.ToString()); qp.SetTableCellContent(tableId, rows, 5, "Value" + i.ToString()); } qp.SetOrigin(1); qp.DrawTableRows(tableId, 30, 60, 4000, 1, 0); //Export report header details start here -- qp.SetTextSize(10); qp.DrawText(380, 20, "Hellow World"); qp.DrawText(380, 35, DateTime.Now.ToString("dd/MM/yy")); qp.DrawText(200, 50, "Hello World Reort"); // Save the document to disk faxSavePdf = qp.SaveToFile(@"test111111.pdf"); Is there a way to handle or write all the rows ? Thanks
|
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
I do not use this function myself, but it looks as if you are writing all the rows onto an A4 page but assuming that you wil have a space 4000 units high to do this. However all you will see will be whatever fits on the page, inside its clip rectangle. DrawTableRows will not add new pages to the PDF, nor do the pagination for you. You can use the firstrow and lastrow parameters, and the return value of the function, to help with this. |
|
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