Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Problem while generating PDF using iText

 
Ranch Hand
Posts: 31
Hibernate Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi:

I have generated PDF using iText, where i have written all code in sequential flow.



And i have added all fields in the document.

But my problem is how to display total pagecount on all pages e.g.1\20 (because i have generated PDF sequentially)
Also i want to add watermark on all pages.

So, can any body help me to solve this problem?


Thank You,
Anup Desai
 
Saloon Keeper
Posts: 7427
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding page numbers is shown here: https://coderanch.com/how-to/java/ItextExample

itext adding watermarks finds examples of exactly that real quick. Pay attention to the iText package names being used - the APIs differ between iText 2 and iText 5 (and you probably don't want to use iText 5).
 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic