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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -