This is a way to do it  :

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.PageSize;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;
import java.io.FileOutputStream;
import java.io.IOException;
/*
* TableWithRowspan.java
*
* Created on den 19 maj 2005, 23:13
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/


/**
*
* @author Janne
*/
public class TableWithRowspan {
/** Creates a new instance of TableWithRowspan */
public TableWithRowspan() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Document document = new Document(PageSize.A4.rotate());
try {
PdfWriter.getInstance(document, new FileOutputStream("Tables.pdf"));
document.open();
PdfPTable outer = new PdfPTable(2);
PdfPTable innerLeft = new PdfPTable(1);
PdfPTable innerRight = new PdfPTable(1);
innerLeft.addCell("This Is the imagecell");
innerRight.addCell("1");
innerRight.addCell("2");
innerRight.addCell("3");
outer.addCell(innerLeft);
outer.addCell(innerRight);
document.add(outer);
} catch(DocumentException de) {
System.err.println(de.getMessage());
} catch(IOException ioe) {
System.err.println(ioe.getMessage());
}
// step 5: we close the document
document.close();
}
}



Janne Berg

Chris White wrote:

I want to have an image take up 3 columns and 3 rows in a PdfPTable.  I can do
this in a Table using Cell.setRowspan(), but I would prefer to use a PdfPTable.
Can anyone help?



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions







-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to