java - AsposeWords get rid of extra table height -
i having trouble trying rid of space on table using aspose words api.
isn't there function use minimal space , extend cell height when text length reaches limit ?
currently, table looks this...
but want table build no spaces below:
what right properties use , in order ?
i building table documentbuilder.
these code :
table table = builder.starttable(); // insert column headers: int hcolumn = 0; (string column : columns) { builder.insertcell(); builder.getfont().setbold(true); builder.getrowformat().setheadingformat(true); builder.writeln(translateheader(column, hcolumn)); table.setbottompadding(0); hcolumn++; } builder.endrow(); // end of header builder.getrowformat().clearformatting(); // loop through records, split comma seperated(per cell) , create // "row" each loop. (string string : data) { list<string> result = arrays.aslist(string.split("\\s*,\\s*")); int column = 0; (string string2 : result) { builder.insertcell(); builder.getfont().setbold(false); builder.getrowformat().setheadingformat(false); // translate , insert builder.writeln(translatedata(string2, column)); column++; } builder.endrow(); } builder.endtable();
i added "setbottompadding" 0 didnt help.
according documents, documentbuilder.writeln
that: inserts string , paragraph break document; want write data without paragraph break. try use builder.write
instead of builder.writeln
, see if it's working.
ps: may know that, ln
@ end of write[ln]
stands line
, means print/write adding new line @ end of text/data.
Comments
Post a Comment