Henry Lu wrote: > I have difficulties to set the table size correctly. Here is mycode: > > Table t = new Table(2, table_contents.length); > t.setAlignment("LEFT"); > t.setBorderWidth(0); > t.setWidths(new int[] {800,80});
I'm more into PDF than RTF, so don't shoot me if I'm wrong, but you should try this: t.setWidth(100); t.setBorder(Rectangle.NO_BORDER); t.setDefaultCellBorder(Rectangle.NO_BORDER); > No matter what that the numbers are, I always got size less than the > page width. The table never reachs the right side of the page. The default table width is 80% of the available width. Change it to 100% with setWidth. > One more question: How do I remove the border of table? Remove the border of the table, as well as the borders of the cells. Note that RTF renderers such as Word will ALWAYS SHOW BORDERS ON THE SCREEN, even if there is none. If you print the document, you will see that there are no borders if you use NO_BORDER. br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions