/*
 * $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;

import com.lowagie.text.rtf.RtfHeaderFooter;

public class HeaderFooterRTF {

public static void main(String[] args) 
{
	Document document = new Document();
	try 
	{
		RtfWriter.getInstance(document, new FileOutputStream("c:\\MyRTF.rtf"));
		RtfHeaderFooter rtfheaderfooter = new RtfHeaderFooter(new Phrase("Camión"));		
		document.setHeader(rtfheaderfooter);
		document.open();
	}
	catch(Exception e) 
	{
		System.err.println(e.getMessage());
	}
	
	document.close();
}
}