c# - Color the background of a piece of text in a PDF document using iTextSharp -
how set background color of piece of text in pdf document using itextsharp without taking form field?
the answer in this post uses formfield
, according me overkill , long-winded way simple.
is there simple way of coloring background of piece of text?
you can use method setbackground
available in chunk
class. there 2 variations of method: 1 takes default padding , 1 allows change padding.
if use ongenerictag()
method on chunk
, can draw custom background (and more). instance: you'd use ongenerictag()
if want draw rectangle rounded corners. see answer duplicate question draw rectangle @ *current position* , position coordinates
Comments
Post a Comment