No. There is no other way to smooth out a bit, but it's awesome. Why do you need anything else?
PDFTK is basically Java (literally hundreds of Java files). You might think about wrapping your project around it. The functionality you are looking for is here (java / com / lowagie / text / pdf / AcroFields.java: 931):
public boolean setFields(XfdfReader xfdf) throws IOException, DocumentException {
boolean ret_val_b= false;
xfdf.getFields();
for (Iterator i = fields.keySet().iterator(); i.hasNext();) {
String f = (String)i.next();
String v = xfdf.getFieldValue(f);
String rv = xfdf.getFieldRichValue(f);
if (rv != null)
ret_val_b= true;
if (v != null)
setField(f, v, v, rv);
}
return ret_val_b;
}
source
share