I think I must include example code with each error message. How on earth do
you expect the table to know it's size if you don't set it? Use
PdfPTable.setTotalWidth().

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Roberto Cipollini [SMTP:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 9:20
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] table width zero?
> 
> ************
> sprry for the previous message...my mistake in sending :)
> ***********
> Hi.
> If i try to write a PdfPtable at an absolute position i have this error
> message:
> " The table width must be greater than zero"
> 
> this is my code (thanks to Nesbal Fra for the PageEvents code :)
> **************************************************
> MyPageEvents events = new MyPageEvents();
> writer.setPageEvent(events);
> com.lowagie.text.Image image_header =
> com.lowagie.text.Image.getInstance(getServletContext().getRealPath(
> "/productsheet/img/pdf_header.jpg" ));
>  image_header.scaleAbsolute(500,90);
> PdfPTable head = new PdfPTable(1);
> head.getDefaultCell().setBorder(com.lowagie.text.Rectangle.NO_BORDER);
> head.getDefaultCell().setColspan(0);
> head.getDefaultCell().setPadding(0);
> PdfPCell cell = new PdfPCell(image_header);
> head.addCell(cell);
> // try to write the table at the left top corner of the page
> head.writeSelectedRows(0, -1, 0, 0, writer.getDirectContent());
> events.setMyHeader(head);
> 
> ***********************
> 
> any idea?
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to