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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:16:02+00:00 2026-06-03T17:16:02+00:00

I am generating a pdf using itext. So when the content of a page

  • 0

I am generating a pdf using itext. So when the content of a page exceeds it creates a new page automatically. I am trying to know if it created a new page. If yes I want to add some image on top of the page.

List paylist =new List(List.ORDERED, List.ALPHABETICAL);
paylist.setIndentationLeft(10);
paylist.add(new ListItem("Some text", yourfont));
document.add(paylist);

The content of the list will be dynamic. So I am unable to find whether its a new page it is in the same page. Suggestion please..

  • 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-03T17:16:05+00:00Added an answer on June 3, 2026 at 5:16 pm

    Subclass PdfPageEventHelper and bind an instance of it to your PdfWriter:

    writer.setPageEvent(new YourCustomPageEventHelper());
    

    Within that class there’s a method called onStartPage that will be called for every page in your document. Use this to add an image to every page, then you don’t have to worry about keeping tracking of things. See this page for a bunch of samples.

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

Sidebar

Related Questions

I'm generating pdf using ReportLab. But when i'm trying to attach image in it,
I am generating pdf using java and itext. When I add image that we
I use itext.dll for genrating a PDF using ASP.NET and I want a footer
I am generating PDF dynamically using html2ps PHP library. I want to decrease time
I am using TCPDF for generating PDF documents and i want to convert a
We are dynamically creating PDF using itext in our application. The content of the
We are using Itext for generating the PDF's in our web application. The PDF's
am generating pdf using Zend_pdf its saving after creating I want to open it
I'm generating a pdf using a VisualForce page with the renderAs param set to
I am using com.lowagie.text.FontFactory in generating a PDF file and am trying to use

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.