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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - DrawTableRows not able to write all the rows.
  FAQ FAQ  Forum Search   Register Register  Login Login

DrawTableRows not able to write all the rows.

 Post Reply Post Reply
Author
Message
MFuser View Drop Down
Beginner
Beginner


Joined: 28 Feb 20
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MFuser Quote  Post ReplyReply Direct Link To This Post Topic: DrawTableRows not able to write all the rows.
    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

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 29 Feb 20 at 10:56AM
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.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store