• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get Width and height of the PDF document dynamically in java?  RSS feed

 
Avk Sai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Experts,

I have a requirement for watermarking a pdf document.

I need your help in getting the coordinates (width and height of PDF) of the given PDF document dynamically.

Please help me out on this issue.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd start by studying the "Watermarker" class that's part of the iText Toolbox. It probably does just about everything you need to do.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avk Sai wrote:I need your help in getting the coordinates (width and height of PDF) of the given PDF document dynamically.

iText also provides methods to determine # pages and the like.

I recently used the watermarking functionality in iText. It's really cool!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should also mention that two styles of watermarking are supported. I used the one where you build a complete document first and then add the watermark. That way the number of pages were known.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!