package test; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTable; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow; public class TestFop { public static void main(String[] args) { try { FileWriter writer = new FileWriter(new File("C:/test.doc")); RtfFile f = new RtfFile(writer); RtfDocumentArea doc = f.startDocumentArea(); RtfSection section = doc.newSection(); RtfParagraph paragraph = section.newParagraph(); paragraph.newText("Testing fop - rtf module - class RtfTableRow"); paragraph.close(); RtfTable table = section.newTable(null); RtfTableRow row = table.newTableRow(); row.newTableCell(2000).newParagraph().newText("blah"); row.newTableCell(5000).newParagraph().newText("doubleBlah"); row.close(); table.close(); section.close(); doc.close(); f.flush(); } catch (IOException ioe) { ioe.printStackTrace(); } } }