pdf - Set Table Column width problems in iText7 -
when want create table in pdf, can use following 2 ways: first 1 failed.
method 1:
float[] columnwidths = {20, 30, 50}; table table = new table(columnwidths);
it's failed control columnwidths method 2:
unitvalue[] unitvalue = new unitvalue[]{ unitvalue.createpercentvalue((float) 20), unitvalue.createpercentvalue((float) 30), unitvalue.createpercentvalue((float) 50)}; table table = new table(columnwidths);
it's success! why happen?
yes, there no way scale column widths in itext 7.0.2, vernon said.
if want use directly 20, 30, , 50 points columns despite min widths shall use construction:
table table = new table(new float[] {20, 30, 50}) // in points .setwidth(100) //100 pt .setfixedlayout();
if set fixed layout must set width well, required fixed layout.
Comments
Post a Comment