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 946205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:52:39+00:00 2026-05-15T22:52:39+00:00

What I am doing is to generate a pdf booklet from database. I need

  • 0

What I am doing is to generate a pdf booklet from database. I need go generate a content table with page numbers. E.g there are two chapters with page number like:

=============================

Content table

Chapter 1 —– 3

Chapter 2 —– 17

=============================

The text “Chapter 1 —– ” is normal paragraph. But the page number “3” has to be produced using PdfTemplate because it can only be known later. But the pdfTemplate is absolutely positioned. How can I know where to position the PdfTemplate? Am I right on this ? How could I figure this out or should I use other methods?

  • 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-15T22:52:40+00:00Added an answer on May 15, 2026 at 10:52 pm

    I’ve extracted a bit of code to get you on your way.. This code allows you to place text anywhere on a page using an x and y. You may actually want to use iTextSharp’s built in paragraph and margin support, but this will be useful, just needs converting to C#

    Dim stamper As PdfStamper
    Dim templateReader As PdfReader = New PdfReader(yourFileName)
    Dim currentPage As PdfImportedPage = stamper.GetImportedPage(templateReader, 1)    
    stamper.InsertPage(1, PageSize.A4)
    Dim cb As PdfContentByte = stamper.GetOverContent(1)
    cb.AddTemplate(currentPage, 0, 0)
    

    Look this next bit with each element you want to add..

    cb.BeginText()
    cb.SetFontAndSize(bf, 12)
    cb.SetColorFill(color) 'create a color object to represent the colour you want
    cb.ShowTextAligned(1, "Content Table", x, y, 0) 'pass in the x & y of the element
    cb.EndText()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want generate PDF File with an image. The image name from database and
I'm trying to have table borders in my PDF using pisa to generate the
I am using Dompdf to generate A5 pdf documents from a html template and
We're using Reporting Services to generate a PDF report and we need it to
I'm looking to generate a PDF document from HTML using the Winnovative PDF Converter
I'm trying to dynamically generate a pdf form from an asp.net C# application. The
I created a rails model by doing script/generate model Customer name:string address:string city:string state:string
What am I doing wrong here: class Helo { // main: generate some simple
I am currently doing a C# WPF application that generates a table that does
Doing my first tryouts with foreign keys in a mySQL database and are trying

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.