February 2, 201114 yr Quick techy question when you are returning Acrofield names from a PDF are you reading the Acrofields, as per iText examples or are you reading from the annotations. I am looking at the plug in but it returns list in a different order to the function I have already written which would require changing some logic in the XML parse functions I use...
February 3, 201114 yr Scribe tries to return the field names in the order they appear in the document. There may be a discrepancy with the version of iText you're using, I seem to recall some older versions not sorting the field lists correctly. What version of itext are you using, and how are you getting the field list? -Sam
February 3, 201114 yr Author 5.0.5 as per the examples in the book // NamesXFA(fm_FileIn, fm_FileOut) // JR 05_03_10 // v1 // takes a PDF form and parses XML content import com.itextpdf.text.pdf.* out = new PrintStream(new FileOutputStream(fm_FileOut)) reader = new PdfReader(fm_FileIn) form = reader.getAcroFields() xfa = form.getXfa() out.println(xfa.isXfaPresent() ? "XFA form" : "AcroForm") fields = form.getFields().keySet() for (String key : fields) { out.println(key) } out.flush() out.close() return true this gives me a different result to ScribeDocListFields
February 9, 201114 yr Are the fields the same, but the order is different? This is likely because Scribe is using an older version of iTex, for licensing reasons.
February 10, 201114 yr Author Yes, same fields, different order. That's most likely solution Sam I will try it out with an earlier iText jar that I have and let you know.
Create an account or sign in to comment