john renfrew Posted February 2, 2011 Posted February 2, 2011 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...
shmert Posted February 3, 2011 Posted February 3, 2011 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
john renfrew Posted February 3, 2011 Author Posted February 3, 2011 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
shmert Posted February 9, 2011 Posted February 9, 2011 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.
john renfrew Posted February 10, 2011 Author Posted February 10, 2011 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.
Recommended Posts
This topic is 5034 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now