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
Post a Comment