c# - itextsharp measure chunk width / height -
i trying precise alignment itextsharp, keep falling short can't figure out way width / height value chunk or paragraph. if create paragraph font , size , text, dimensions should known, right?
i know default left/right/center alignments trick me mostly, have scenarios knowing dimensions useful. ideas?
you can chunk's width using getwidthpoint()
, height of chunk font's size unless you're using lowercase letters. if can manually measure characters using basefont.getcharbbox()
.
paragraphs flowable items, however, , depend on context written measuring them harder. (chunks don't automatically wrap paragraphs do.) best way measure paragraph write pdfcell
, measure pdfcell
. don't have add pdfcell
document. link below explains little more.
http://itext-general.2136553.n4.nabble.com/linecount-td2146114.html
Comments
Post a Comment