How to Add Page number for each page and table footer row using componentpro.PDF

0
I am using componentpro.PDF for creating a pdf file with some details, but I am not able to add the Footer to my table and number for each of the page Following is my code // Create a new PDF document. This object represents the PDF document. PdfDocument doc = new PdfDocument(); // Add a page to the document PdfPage page = doc.Pages.Add(); //Create Data Source string[][] datastring = new string[10][]; for (int j = 0; j < 10; j ) { datastring[j] = new string[] { "Date" j, "Description" j, "Quantity" j, "Price" j, "Cost" j }; } PdfSimpleTable table = new PdfSimpleTable(); table.DataSource = datastring; table.Style.RepeatHeader = true; table.Style.CellSpacing = 0; table.Style.CellPadding = 4; table.Style.ShowHeader = true; //Format Columns PdfColumnCollection columns = table.Columns; columns[0].Width = 10; columns[0].ColumnName = "Header 1"; columns[0].StringFormat = new PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle); columns[1].Width = 50; columns[1].ColumnName = " Header 2"; columns[1].StringFormat = new PdfStringFormat(PdfTextAlignment.Left, PdfVerticalAlignment.Middle); columns[2].Width = 12; columns[2].ColumnName = " Header 3"; columns[2].StringFormat = new PdfStringFormat(PdfTextAlignment.Right, PdfVerticalAlignment.Middle); columns[3].Width = 14; columns[3].ColumnName = " Header 4 "; columns[3].StringFormat = new PdfStringFormat(PdfTextAlignment.Right, PdfVerticalAlignment.Middle); columns[4].Width = 14; columns[4].ColumnName = "Header 5"; columns[4].StringFormat = new PdfStringFormat(PdfTextAlignment.Right, PdfVerticalAlignment.Middle); ///HOW TO ADD FOOTER TO table OBJECT ABOVE AND PAGE NUMBER for EACH PAGE (PDF HAS MANY NUMBER OF PAGES) // Draw the table table.Draw(page, new PointF(0, 0)); // Save the PDF document to disk. doc.Save(@"c:\customize table.pdf"); // Close the document. doc.Close(); Please help Thanks Amol
pdf
 
asked 9/28/2018 12:06:48 PM
add a comment

1 Answers

0
The current version does not support suck feature. You may want to manually draw table rows in this case.
 
answered 10/2/2018 10:18:35 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged pdf or ask your own question.