Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6059217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:41:09+00:00 2026-05-23T08:41:09+00:00

I use the last version of itextsharp. I use the property HeaderRows=1 so that

  • 0

I use the last version of itextsharp.

I use the property HeaderRows=1 so that if there is a pagebreak, the Header rows will appear again in the next page.

Then we have the rows of the content with the border style without bottomline like this:

 PdfPCell cell1 = null;
 cell1 = new PdfPCell(new Phrase(string.Format("{0}", c1), fn));
 cell1.Border = Rectangle.RIGHT_BORDER | Rectangle.LEFT_BORDER;

When there is a pagebreak, the line bottom of the table is not shown, which is not logical.
Even if the content rows have no bottom / top border, the PdfPTable itself should have borders (it does not have in the code in fact).

Any ideas? Thx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:41:09+00:00Added an answer on May 23, 2026 at 8:41 am

    I think I have been lucky, this was not easy to find.

    I was looking for some event to localise the last row of the page and I found it.

    You instance it like this:

      PdfPTable ItemTable = new PdfPTable(7);
        ItemTable.TableEvent = new LineaBottom();
    

    The class is the following:

     public class LineaBottom : IPdfPTableEvent
    {
    
    
        #region IPdfPTableEvent Members
    
        void IPdfPTableEvent.TableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
        {
            int columns;
            Rectangle rect;
            int footer = widths.Length - table.FooterRows;
            int header = table.HeaderRows - table.FooterRows + 1;
            int ultima = footer - 1;
            if (ultima != -1)
            {
                columns = widths[ultima].Length - 1;
                rect = new Rectangle(widths[ultima][0], heights[ultima], widths[footer - 1][columns], heights[ultima + 1]);
                rect.BorderColor = BaseColor.BLACK;
                rect.BorderWidth = 1;
                rect.Border = Rectangle.TOP_BORDER;
                canvases[PdfPTable.BASECANVAS].Rectangle(rect);
            }
        }
    
        #endregion
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use the last version of rails, in my Gemfile: gem 'rails',
I use phpFlickr (last stable version) on Windows Vista and WAMP2.0 : and I
I’m trying to use Gradle to build a project that will run an imbedded
I use old Django version 1.1 with hack, that support join in extra(). It
I'm trying to use the Last.fm API for an application I'm creating, but am
What should I use: /findby/name/{first}_{last} /findby/name/{first}-{last} /findby/name/{first};{last} /findby/name/first/{first}/last/{last} etc. The URI represents a Person
I want to use greasemonkey to scrape wiki data from Last.fm (this is not
is it possible to use something like an vim-close/exit-Event to execute some last commands
Im wondering if the way i use to retrieve the id of the last
it’s been a while since the last time I had to use regex, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.