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

  • Home
  • SEARCH
  • 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 8779293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:45:03+00:00 2026-06-13T19:45:03+00:00

I am using iTextSharp and CSharp for creating the pdf.I am creating many tables.So

  • 0

I am using iTextSharp and CSharp for creating the pdf.I am creating many tables.So i need to position each tables in different location.

Is it possible?

  • 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-06-13T19:45:04+00:00Added an answer on June 13, 2026 at 7:45 pm

    I use this code because the original pdfptable automates it’s position:

            Private mywriter As PdfWriter
            Dim Theight = Table.CalculateHeights
            Dim DirectC As PdfContentByte = mywriter.DirectContent
            Dim templ = DirectC.CreateTemplate(Table.TotalWidth, Theight)
            Table.WriteSelectedRows(0, -1, 0.0F, Theight, templ)
            Dim myimage = Image.GetInstance(templ)
    
            Dim CenterH = (Doc.Top + Doc.BottomMargin) / 2
    
            Dim NewPosH = CenterH - myimage.Height / 2
    
            Dim CenterW = mywriter.PageSize.Width / 2
            Dim NewPosW = CenterW - myimage.Width / 2
    
            myimage.SetAbsolutePosition(NewPosW, NewPosH)
            DirectC.AddImage(myimage)
    

    This Code positions the table in the middle of the page. Beware: The coordinate system begins in the LOWER left, not in the upper left.
    Its vb.net code, but adaption should not be too hard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using iTextSharp and CSharp for creating the pdf. I need to add
i am using itextsharp and creating a PDF with images. currently the images i
Im using ITextSharp to generate a PDF, and have a situation where a need
Using itextsharp (or any c# pdf library), i need to open a PDF, replace
I'm using ITextSharp to generate PDF files. Is it also possible to generate XPS
I am using iTextSharp for creating PDF for reports & send as attachment(). Pdf
I'm creating a PDF using iTextSharp and after adding all my pages, I want
I'm using iTextSharp to generate some PDF files. I have two tables which have
I need to create a PDF Report using iTextSharp. I have an excel sample,which
I m creating a pdf file on the server using iTextSharp. It is working

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.