Use setWidthPercentage().

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Christian Kriebel [SMTP:[EMAIL PROTECTED]
> Sent: Friday, March 14, 2003 17:03
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] total width of PDFTable not recognised
> 
> Hi
> 
> I try to set the total width of a table (should fill the page horizontally
> between page margins).
> 
> document.addTable( table ) doesn't work, table.writeSelectedRows() works ?
> Using the last approach isn't really useful, because it would be really
> hard
> to calculate the x, y positions. 
> Can anyone help ?
> 
> Best wishes 
> Christian
> 
> --------------------------------------------
> Document document = new Document();
> PdfWriter writer = PdfWriter.getInstance( document, pOut );
> 
> document.open();
> PdfPTable table = new PdfPTable(5);    
> table.setTotalWidth(  100 );
> 
> int[] tableWidths = {1,2,3,4,5};
> table.setWidths(tableWidths);
> 
> for (int k = 0; k < 30; ++k) {
>    table.addCell("cell " + k);
> }
> // here total width is recognised
> table.writeSelectedRows(0, -1, 100, 600, writer.getDirectContent());
> 
> // total with isn't recognised
> //document.add(table);
> 
> 
> -- 
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open! 
> Get cracking and register here for some mind boggling fun and 
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to