FormFields formFields = source.findFormFields();
StringBuffer sb = new StringBuffer();
for (Iterator i = formFields.iterator(); i.hasNext();) {
FormField formField = (FormField) i.next();
formFields.addValue(formField.getName(), sb.toString());
sb.setLength(0);
}
OutputDocument outputDocument = new OutputDocument(source);
outputDocument.replace(formFields);