public void exportAsFdf ( FdfWriter writer ) { for ( Iterator it = fields . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Map . Entry entry = ( Map . Entry ) it . next ( ) ; Item item = ( Item ) entry . getValue ( ) ; String name = ( String ) entry . getKey ( ) ; PdfObject v = item . getMerged ( 0 ) . get ( PdfName . V ) ; if ( v == null ) continue ; String value = getField ( name ) ; if ( lastWasString ) writer . setFieldAsString ( name , value ) ; else writer . setFieldAsName ( name , value ) ; } }
Export the fields as a FDF .