c# - Horizontal text alignment in a PdfPCell -


i using code align horizontally.

cell = new pdfpcell(); p = new phrase("value"); cell.addelement(p); cell.horizontalalignment = pdfpcell.align_center; //tried element.align_center also. tried adding line before adding element also.  table.addcell(cell); 

it's not working.

i creating table 5 columns in , adding cells dynamically in runtime in loop above code. want cells content centered.

try this,

cell = new pdfpcell(); p = new phrase("value"); cell.addelement(p); cell.horizontalalignment = element.align_center; //tried element.align_center also. tried adding line before adding element also.  table.addcell(cell); 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -