Currently I have a PdfGrid that is created that gets data from a 2D string array. The string array is filled using data from a data grid view which my users can enter data into. Currently if I enter lots of information into the data grid view, then the table goes over to the next page fine, but then the data that needs to get placed underneath it ends up on top of the grid on the top of my PDF. Below is what I currently have drawing the grid and getting its height for the next object:
- Code: Select all
result = itemGrid.Draw(page, new PointF(0, y));
y = y + result.Bounds.Height + 10;
But the height is now the height of the one row that made its way onto the second page. What I need to know is how to tell my next few elements whether or not the result has ended up onto the next page, and then how to draw my next objects below it.
I also have another problem where if the grid is only just on one page, then my content is getting draw behind my footer. My header and footer is created using the PdfPageTemplateElement, but for some reason instead of my next content going onto the next page it is just getting draw behind the footer template.
Any help would be appreciated, thanks.