This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add curve to the pdftable in itext

 
vijay jamadade
Ranch Hand
Posts: 243
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

I have created a report pdf file in itext. I have two tables in that which has some data in it. Generally the tables we create in itext have sharp edge corners. I want to have the rounded corners for my table.

I searched a lot but couldn't found any idea for that. Please tell me what to do.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The solution lies in table events and cell events (depending on whether you want the complete table to have round corners, or individual cells). See the section "Cell and Table Events" here.
 
vijay jamadade
Ranch Hand
Posts: 243
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
The problem is the tutorial www.lowagie.com/iText at this link is too old and doesn't contain the layout related example for table to refer. Can you please send me some sample ? Really I have searched a lot. Please help me out.

One more thing is adding the page numbers automatically if the page goes beyond one page to the second page. when I searched for it, it gave me something to implement the 22 methods for the things like addition of page numbers. Is it ok that for adding a small thing like page number I will need to this stuff. Or there is another way I am missing.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not aware of full examples of doing what you're asking. But the key to custom table drawing are table events, and those example codes show how those can be used to customize table appearance. That should give you a pretty good start.

I don't know what you mean by "22 methods". An example of how to add page numbers to a document can be found at http://faq.javaranch.com/java/ItextExample
 
vijay jamadade
Ranch Hand
Posts: 243
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution Ulf, You need to have a inner class as



and after that add that event to cell




It will have the rounded corners for that cell depending on the last attribute
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic