Hi Fatimah

you can Make Condetion  or loop to set fixed no of rows and add your Bottom
Rowa in  apage after that
 you can use

 pdfDoc.SetMargins(1, 1f, 1f, 1f);
  pdfDoc.NewPage();

 this is Simple Example to Saprte the rows in multi pages.



        try
        {

            Document pdfDoc = new Document(PageSize.A4.Rotate());
            PdfWriter writer = PdfWriter.GetInstance(pdfDoc,
Page.Response.OutputStream);

            pdfDoc.SetMargins(30f, 30f, 1f, 1f);
            pdfDoc.Open();

// this is GridView  dgvEmployee
            for (int i = 0; i <= dgvEmployee.Rows.Count; i = i + 13)
            {
                iTextSharp.text.pdf.PdfPTable maintable = new
iTextSharp.text.pdf.PdfPTable(1);
                maintable.WidthPercentage = 105;

                iTextSharp.text.pdf.PdfPCell headercell = new
iTextSharp.text.pdf.PdfPCell(headeetable());
                headercell.FixedHeight = 130;
                headercell.Border = 0;
                headercell.HorizontalAlignment = 1;
                maintable.AddCell(headercell);



                iTextSharp.text.pdf.PdfPCell maincell = new
iTextSharp.text.pdf.PdfPCell(datatable(i));
                maincell.BorderWidth = 2;
                maintable.AddCell(maincell);


                iTextSharp.text.pdf.PdfPCell footercell = new
iTextSharp.text.pdf.PdfPCell(footertable());
                footercell.FixedHeight = 90;
                footercell.Border = 0;
                maintable.AddCell(footercell);


                pdfDoc.Add(maintable);
                pdfDoc.SetMargins(30f, 30f, 5f, 5f);
                pdfDoc.NewPage();
            }
            pdfDoc.Close();

            Page.Response.ContentType = "application/pdf";
            Page.Response.AddHeader("content-disposition",
"attachment;filename=" + DateTime.Now.Day + "_" + DateTime.Now.Month + "_"
+ DateTime.Now.Year + ".pdf");
            Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Page.Response.Write(pdfDoc);
            Page.Response.End();


        }
        catch (Exception ex)
        {
            Page.Response.Write(ex.Message);

        }


On 20 March 2013 08:19, Fathima Farhana <fathima.farh...@zohocorp.com>wrote:

> I want to set "bottom" border only for the last row of the table  i done
> this
> by some conditions......
>
> But the problem is, when there is large number of rows the PdfWriter
> automatically splits the table into several pages..
>
> so the bottom border is not added for the last row of all the pages in
> PdfDocument, it get adds only in the last page where the table ends.
>
> i can trigger the SplitTable() method whenever the table splits.. but i
> cannot track(access) the last row of that page..
>
> So, How can i access the row where the table get splits..


> Thanks in Advance
>
>
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/How-to-change-the-border-of-the-last-row-in-current-page-of-a-table-when-it-gets-splits-tp4657854.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>



-- 
Best Regards
---------------------------
*Mohammed Hashem*
Web Developer @ ArabSea.
www.arabsea.com
00966 - 538 766 152
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to