*/
public FDFDocument exportFDF() throws IOException
{
FDFDocument fdf = new FDFDocument();
FDFCatalog catalog = fdf.getCatalog();
FDFDictionary fdfDict = new FDFDictionary();
catalog.setFDF( fdfDict );
List fdfFields = new ArrayList();
List fields = getFields();
Iterator fieldIter = fields.iterator();
while( fieldIter.hasNext() )
{
PDField docField = (PDField)fieldIter.next();
addFieldAndChildren( docField, fdfFields );
}
fdfDict.setID( document.getDocument().getDocumentID() );
if( fdfFields.size() > 0 )
{
fdfDict.setFields( fdfFields );
}
return fdf;
}