Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5034 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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...

Posted

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

Posted

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

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.