/*
 * $Id: Chap0801.java,v 1.8 2003/02/25 13:50:05 hallm Exp $
 * $Name:  $
 *
 * This code is free software. It may only be copied or modified
 * if you include the following copyright notice:
 *
 * --> Copyright 2001 by Bruno Lowagie <--
 *
 * This code is part of the 'iText Tutorial'.
 * You can find the complete tutorial at the following address:
 * http://www.lowagie.com/iText/tutorial/
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * itext@lowagie.com
 */

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.*;
import com.lowagie.text.rtf.RtfWriter;

public class MyRTF {

public static void main(String[] args) 
{
	Document document = new Document();
	try 
	{
		RtfWriter.getInstance(document, new FileOutputStream("e:\\MyRTF.rtf"));

		document.open();
			
	 	Table table=null;
		table = new Table(1);
		float ancho[] = {100f};
		table.setWidth(100F);
		table.setWidths(ancho);	 
		table.addCell(new Cell("hola"));
		
		document.add(table);
		document.add(new Paragraph("Mogollón!!!!"));
		document.newPage();
		//document.add(new Paragraph("Mogollón!!!!"));
		
		document.add(table);
		}
		catch(DocumentException de) {
			System.err.println(de.getMessage());
		}
		catch(IOException ioe) {
			System.err.println(ioe.getMessage());
		}
		document.close();
}
}