How to enclose a text in box in itextpdf (while generating pdfs) -


i have display normal text , next following text should inclosed in box. how can in itextpdf. there easy way.

example name: name

in above name should inclosed in box.

if "box" mean colored background, can use setbackground() method:

chunk chunk = new chunk("my name"); chunk.setbackground(basecolor.red); 

you can add 4 parameters extend rectangle left, bottom, right , top api documentation indicates.

if "box" mean rectangle (without background color), can use generic tag event. movieyears example shows how add film strip or ellipse chunks. result shown here. years put in small box looks pellicule. imdb links put in blue ellipse.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -